@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
|
@@ -5,18 +5,18 @@ import "../error/index.mjs";
|
|
|
5
5
|
import { injectable } from "../plugins/index.mjs";
|
|
6
6
|
import { __decorate } from "../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.mjs";
|
|
7
7
|
import { KeyManagementError } from "../modules/kms/error/KeyManagementError.mjs";
|
|
8
|
-
import { isKnownJwaSignatureAlgorithm } from "../modules/kms/jwk/jwa.mjs";
|
|
9
8
|
import { TypedArrayEncoder } from "../utils/TypedArrayEncoder.mjs";
|
|
10
9
|
import { JsonEncoder } from "../utils/JsonEncoder.mjs";
|
|
11
10
|
import "../utils/index.mjs";
|
|
12
11
|
import { getJwkHumanDescription } from "../modules/kms/jwk/humanDescription.mjs";
|
|
13
|
-
import { assertJwkAsymmetric } from "../modules/kms/jwk/knownJwk.mjs";
|
|
14
12
|
import { assymetricPublicJwkMatches } from "../modules/kms/jwk/equals.mjs";
|
|
13
|
+
import { isKnownJwaSignatureAlgorithm } from "../modules/kms/jwk/jwa.mjs";
|
|
14
|
+
import { assertJwkAsymmetric } from "../modules/kms/jwk/knownJwk.mjs";
|
|
15
15
|
import { PublicJwk } from "../modules/kms/jwk/PublicJwk.mjs";
|
|
16
16
|
import { KeyManagementApi } from "../modules/kms/KeyManagementApi.mjs";
|
|
17
17
|
import "../modules/kms/index.mjs";
|
|
18
|
-
import { X509Service } from "../modules/x509/X509Service.mjs";
|
|
19
18
|
import { X509ModuleConfig } from "../modules/x509/X509ModuleConfig.mjs";
|
|
19
|
+
import { X509Service } from "../modules/x509/X509Service.mjs";
|
|
20
20
|
import "../modules/x509/index.mjs";
|
|
21
21
|
import { isJsonObject } from "../types.mjs";
|
|
22
22
|
import { JWS_COMPACT_FORMAT_MATCHER } from "./JwsTypes.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JwsService.mjs","names":["JwsService","signatures: JwsDetachedFormat[]","payload: string","jwsSigners: JwsSignerWithJwk[]","jws"],"sources":["../../src/crypto/JwsService.ts"],"sourcesContent":["import type { AgentContext } from '../agent'\nimport type {\n Jws,\n JwsDetachedFormat,\n JwsFlattenedFormat,\n JwsGeneralFormat,\n JwsProtectedHeaderOptions,\n} from './JwsTypes'\n\nimport { CredoError } from '../error'\nimport { type EncodedX509Certificate, X509ModuleConfig } from '../modules/x509'\nimport { injectable } from '../plugins'\nimport { Buffer, JsonEncoder, TypedArrayEncoder } from '../utils'\n\nimport {\n KeyManagementApi,\n KeyManagementError,\n type KnownJwaSignatureAlgorithm,\n PublicJwk,\n assertJwkAsymmetric,\n assymetricPublicJwkMatches,\n getJwkHumanDescription,\n} from '../modules/kms'\nimport { isKnownJwaSignatureAlgorithm } from '../modules/kms/jwk/jwa'\nimport { isJsonObject } from '../types'\nimport { X509Service } from './../modules/x509/X509Service'\nimport type { JwsSigner, JwsSignerWithJwk } from './JwsSigner'\nimport { JWS_COMPACT_FORMAT_MATCHER } from './JwsTypes'\nimport { JwtPayload } from './jose/jwt'\n\n@injectable()\nexport class JwsService {\n private async createJwsBase(agentContext: AgentContext, options: CreateJwsBaseOptions) {\n const { jwk, alg, x5c } = options.protectedHeaderOptions\n\n const kms = agentContext.dependencyManager.resolve(KeyManagementApi)\n\n const key = await kms.getPublicKey({ keyId: options.keyId })\n assertJwkAsymmetric(key)\n\n const publicJwk = PublicJwk.fromPublicJwk(key)\n\n // Make sure the options.x5c and x5c from protectedHeader are the same.\n if (x5c) {\n const certificate = X509Service.getLeafCertificate(agentContext, {\n certificateChain: x5c,\n })\n\n if (!assymetricPublicJwkMatches(certificate.publicJwk.toJson(), key)) {\n throw new CredoError('Protected header x5c does not match key for signing.')\n }\n }\n\n const jwkInstance = jwk instanceof PublicJwk ? jwk : jwk ? PublicJwk.fromUnknown(jwk) : undefined\n // Make sure the options.key and jwk from protectedHeader are the same.\n if (jwkInstance && !assymetricPublicJwkMatches(jwkInstance.toJson(), key)) {\n throw new CredoError('Protected header JWK does not match key for signing.')\n }\n\n // Validate the options.key used for signing against the jws options\n if (!publicJwk.supportedSignatureAlgorithms.includes(alg)) {\n throw new CredoError(\n `alg '${alg}' is not a valid JWA signature algorithm for this jwk with ${publicJwk.jwkTypehumanDescription}. Supported algorithms are ${publicJwk.supportedSignatureAlgorithms.join(\n ', '\n )}`\n )\n }\n\n const payload =\n options.payload instanceof JwtPayload ? JsonEncoder.toBuffer(options.payload.toJson()) : options.payload\n\n const base64Payload = TypedArrayEncoder.toBase64URL(payload)\n const base64UrlProtectedHeader = JsonEncoder.toBase64URL(this.buildProtected(options.protectedHeaderOptions))\n\n const signResult = await kms.sign({\n algorithm: alg,\n data: TypedArrayEncoder.fromString(`${base64UrlProtectedHeader}.${base64Payload}`),\n keyId: options.keyId,\n })\n const signature = TypedArrayEncoder.toBase64URL(signResult.signature)\n\n return {\n base64Payload,\n base64UrlProtectedHeader,\n signature,\n }\n }\n\n public async createJws(\n agentContext: AgentContext,\n { payload, keyId, header, protectedHeaderOptions }: CreateJwsOptions\n ): Promise<JwsGeneralFormat> {\n const { base64UrlProtectedHeader, signature, base64Payload } = await this.createJwsBase(agentContext, {\n payload,\n keyId,\n protectedHeaderOptions,\n })\n\n return {\n protected: base64UrlProtectedHeader,\n signature,\n header,\n payload: base64Payload,\n }\n }\n\n /**\n * @see {@link https://www.rfc-editor.org/rfc/rfc7515#section-3.1}\n * */\n public async createJwsCompact(\n agentContext: AgentContext,\n { payload, keyId, protectedHeaderOptions }: CreateCompactJwsOptions\n ): Promise<string> {\n const { base64Payload, base64UrlProtectedHeader, signature } = await this.createJwsBase(agentContext, {\n payload,\n keyId,\n protectedHeaderOptions,\n })\n return `${base64UrlProtectedHeader}.${base64Payload}.${signature}`\n }\n\n /**\n * Verify a JWS\n */\n public async verifyJws(\n agentContext: AgentContext,\n {\n jws,\n resolveJwsSigner,\n trustedCertificates,\n jwsSigner: expectedJwsSigner,\n allowedJwsSignerMethods = ['did', 'jwk', 'x5c'],\n }: VerifyJwsOptions\n ): Promise<VerifyJwsResult> {\n let signatures: JwsDetachedFormat[] = []\n let payload: string\n\n if (expectedJwsSigner && !allowedJwsSignerMethods.includes(expectedJwsSigner.method)) {\n throw new CredoError(\n `jwsSigner provided with method '${\n expectedJwsSigner.method\n }', but allowed jws signer methods are ${allowedJwsSignerMethods.join(', ')}.`\n )\n }\n\n if (typeof jws === 'string') {\n if (!JWS_COMPACT_FORMAT_MATCHER.test(jws)) throw new CredoError(`Invalid JWS compact format for value '${jws}'.`)\n\n const [protectedHeader, _payload, signature] = jws.split('.')\n\n payload = _payload\n signatures.push({\n header: {},\n protected: protectedHeader,\n signature,\n })\n } else if ('signatures' in jws) {\n signatures = jws.signatures\n payload = jws.payload\n } else {\n signatures.push(jws)\n payload = jws.payload\n }\n\n if (signatures.length === 0) {\n throw new CredoError('Unable to verify JWS, no signatures present in JWS.')\n }\n\n const jwsFlattened = {\n signatures,\n payload,\n } satisfies JwsFlattenedFormat\n\n const jwsSigners: JwsSignerWithJwk[] = []\n for (const jws of signatures) {\n const protectedJson = JsonEncoder.fromBase64(jws.protected)\n\n if (!isJsonObject(protectedJson)) {\n throw new CredoError('Unable to verify JWS, protected header is not a valid JSON object.')\n }\n\n if (!protectedJson.alg || typeof protectedJson.alg !== 'string') {\n throw new CredoError('Unable to verify JWS, protected header alg is not provided or not a string.')\n }\n\n const jwsSigner =\n expectedJwsSigner ??\n (await this.jwsSignerFromJws(agentContext, {\n jws,\n payload,\n protectedHeader: {\n ...protectedJson,\n alg: protectedJson.alg,\n },\n allowedJwsSignerMethods,\n resolveJwsSigner,\n }))\n\n await this.verifyJwsSigner(agentContext, {\n jwsSigner,\n trustedCertificates,\n })\n\n if (!jwsSigner.jwk.supportedSignatureAlgorithms.includes(protectedJson.alg as KnownJwaSignatureAlgorithm)) {\n throw new CredoError(\n `alg '${protectedJson.alg}' is not a valid JWA signature algorithm for this jwk ${getJwkHumanDescription(jwsSigner.jwk.toJson())}. Supported algorithms are ${jwsSigner.jwk.supportedSignatureAlgorithms.join(', ')}`\n )\n }\n\n const data = TypedArrayEncoder.fromString(`${jws.protected}.${payload}`)\n const signature = TypedArrayEncoder.fromBase64(jws.signature)\n jwsSigners.push(jwsSigner)\n\n const kms = agentContext.dependencyManager.resolve(KeyManagementApi)\n\n try {\n const { verified } = await kms.verify({\n key: {\n publicJwk: jwsSigner.jwk.toJson(),\n },\n data,\n signature,\n algorithm: protectedJson.alg as KnownJwaSignatureAlgorithm,\n })\n\n if (!verified) {\n return {\n isValid: false,\n jwsSigners: [],\n jws: jwsFlattened,\n }\n }\n } catch (error) {\n // WalletError probably means signature verification failed. Would be useful to add\n // more specific error type in kms.verify method\n if (error instanceof KeyManagementError) {\n return {\n isValid: false,\n jwsSigners: [],\n jws: jwsFlattened,\n }\n }\n\n throw error\n }\n }\n\n return { isValid: true, jwsSigners, jws: jwsFlattened }\n }\n\n private buildProtected(options: JwsProtectedHeaderOptions) {\n return {\n ...options,\n alg: options.alg,\n jwk: options.jwk instanceof PublicJwk ? options.jwk.toJson() : options.jwk,\n kid: options.kid,\n }\n }\n\n private async verifyJwsSigner(\n agentContext: AgentContext,\n options: {\n jwsSigner: JwsSignerWithJwk\n trustedCertificates?: EncodedX509Certificate[]\n }\n ) {\n const { jwsSigner } = options\n\n if (jwsSigner.method === 'x5c') {\n const trustedCertificatesFromConfig =\n agentContext.dependencyManager.resolve(X509ModuleConfig).trustedCertificates ?? []\n const trustedCertificates = options.trustedCertificates ?? trustedCertificatesFromConfig\n if (trustedCertificates.length === 0) {\n throw new CredoError(\n `trustedCertificates is required when the JWS protected header contains an 'x5c' property.`\n )\n }\n\n await X509Service.validateCertificateChain(agentContext, {\n certificateChain: jwsSigner.x5c,\n trustedCertificates,\n })\n }\n }\n\n private async jwsSignerFromJws(\n agentContext: AgentContext,\n options: {\n jws: JwsDetachedFormat\n allowedJwsSignerMethods: JwsSigner['method'][]\n protectedHeader: { alg: string; [key: string]: unknown }\n payload: string\n resolveJwsSigner?: JwsSignerResolver\n }\n ): Promise<JwsSignerWithJwk> {\n const { protectedHeader, resolveJwsSigner, jws, payload, allowedJwsSignerMethods } = options\n\n const alg = protectedHeader.alg\n if (!isKnownJwaSignatureAlgorithm(alg)) {\n throw new CredoError(`Unsupported JWA signature algorithm '${protectedHeader.alg}'`)\n }\n\n if (protectedHeader.x5c && allowedJwsSignerMethods.includes('x5c')) {\n if (\n !Array.isArray(protectedHeader.x5c) ||\n protectedHeader.x5c.some((certificate) => typeof certificate !== 'string')\n ) {\n throw new CredoError('x5c header is not a valid JSON array of strings.')\n }\n\n const certificate = X509Service.getLeafCertificate(agentContext, {\n certificateChain: protectedHeader.x5c,\n })\n return {\n method: 'x5c',\n jwk: certificate.publicJwk,\n x5c: protectedHeader.x5c,\n }\n }\n\n // Jwk\n if (protectedHeader.jwk && allowedJwsSignerMethods.includes('jwk')) {\n if (!isJsonObject(protectedHeader.jwk)) throw new CredoError('JWK is not a valid JSON object.')\n\n const protectedJwk = PublicJwk.fromUnknown(protectedHeader.jwk)\n\n return {\n method: 'jwk',\n jwk: protectedJwk,\n }\n }\n\n if (!resolveJwsSigner) {\n throw new CredoError(`resolveJwsSigner is required for resolving jws signers other than 'jwk' and 'x5c'.`)\n }\n\n try {\n const jwsSigner = await resolveJwsSigner({\n jws,\n protectedHeader: {\n ...protectedHeader,\n alg,\n },\n payload,\n })\n\n if (!allowedJwsSignerMethods.includes(jwsSigner.method)) {\n throw new CredoError(\n `resolveJwsSigner returned jws signer with method '${\n jwsSigner.method\n }', but allowed jws signer methods are ${allowedJwsSignerMethods.join(', ')}.`\n )\n }\n\n return jwsSigner\n } catch (error) {\n throw new CredoError(`Error when resolving jws signer for jws in resolveJwsSigner. ${error.message}`, {\n cause: error,\n })\n }\n }\n}\n\nexport interface CreateJwsOptions {\n payload: Buffer | JwtPayload\n keyId: string\n header: Record<string, unknown>\n protectedHeaderOptions: JwsProtectedHeaderOptions\n}\n\ntype CreateJwsBaseOptions = Omit<CreateJwsOptions, 'header'>\ntype CreateCompactJwsOptions = Omit<CreateJwsOptions, 'header'>\n\nexport interface VerifyJwsOptions {\n jws: Jws\n\n /**\n * The expected signer of the JWS. If provided the signer won't be dynamically\n * detected based on the values in the JWS.\n */\n jwsSigner?: JwsSignerWithJwk\n\n /**\n * Allowed jws signer methods when dynamically inferring the jws signer method.\n */\n allowedJwsSignerMethods?: JwsSigner['method'][]\n\n /*\n * Method that should return the JWS signer was used\n * to sign the JWS.\n *\n * This method is called by the JWS Service when it could not determine the public key.\n *\n * Currently the JWS Service can only determine the public key if the JWS protected header\n * contains a `jwk` or `x5c` property. In all other cases, it's up to the caller to resolve the public\n * key based on the JWS.\n *\n * A common use case is the `kid` property in the JWS protected header. Or determining the key\n * base on the `iss` property in the JWT payload.\n */\n resolveJwsSigner?: JwsSignerResolver\n\n trustedCertificates?: EncodedX509Certificate[]\n}\n\nexport type JwsSignerResolver = (options: {\n jws: JwsDetachedFormat\n payload: string\n protectedHeader: {\n alg: KnownJwaSignatureAlgorithm\n jwk?: string\n kid?: string\n [key: string]: unknown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CAAC;AAEF,OAAI,CAAC,wBAAwB,SAAS,UAAU,OAAO,CACrD,OAAM,IAAI,WACR,qDACE,UAAU,OACX,wCAAwC,wBAAwB,KAAK,KAAK,CAAC,GAC7E;AAGH,UAAO;WACA,OAAO;AACd,SAAM,IAAI,WAAW,gEAAgE,MAAM,WAAW,EACpG,OAAO,OACR,CAAC;;;;yBAxUP,YAAY"}
|
|
1
|
+
{"version":3,"file":"JwsService.mjs","names":["JwsService","signatures: JwsDetachedFormat[]","payload: string","jwsSigners: JwsSignerWithJwk[]","jws"],"sources":["../../src/crypto/JwsService.ts"],"sourcesContent":["import type { AgentContext } from '../agent'\nimport { CredoError } from '../error'\nimport {\n assertJwkAsymmetric,\n assymetricPublicJwkMatches,\n getJwkHumanDescription,\n KeyManagementApi,\n KeyManagementError,\n type KnownJwaSignatureAlgorithm,\n PublicJwk,\n} from '../modules/kms'\nimport { isKnownJwaSignatureAlgorithm } from '../modules/kms/jwk/jwa'\nimport { type EncodedX509Certificate, X509ModuleConfig } from '../modules/x509'\nimport { X509Service } from './../modules/x509/X509Service'\nimport { injectable } from '../plugins'\nimport { type AnyUint8Array, isJsonObject } from '../types'\nimport { JsonEncoder, TypedArrayEncoder } from '../utils'\nimport type { JwsSigner, JwsSignerWithJwk } from './JwsSigner'\nimport type {\n Jws,\n JwsDetachedFormat,\n JwsFlattenedFormat,\n JwsGeneralFormat,\n JwsProtectedHeaderOptions,\n} from './JwsTypes'\nimport { JWS_COMPACT_FORMAT_MATCHER } from './JwsTypes'\nimport { JwtPayload } from './jose/jwt'\n\n@injectable()\nexport class JwsService {\n private async createJwsBase(agentContext: AgentContext, options: CreateJwsBaseOptions) {\n const { jwk, alg, x5c } = options.protectedHeaderOptions\n\n const kms = agentContext.dependencyManager.resolve(KeyManagementApi)\n\n const key = await kms.getPublicKey({ keyId: options.keyId })\n assertJwkAsymmetric(key)\n\n const publicJwk = PublicJwk.fromPublicJwk(key)\n\n // Make sure the options.x5c and x5c from protectedHeader are the same.\n if (x5c) {\n const certificate = X509Service.getLeafCertificate(agentContext, {\n certificateChain: x5c,\n })\n\n if (!assymetricPublicJwkMatches(certificate.publicJwk.toJson(), key)) {\n throw new CredoError('Protected header x5c does not match key for signing.')\n }\n }\n\n const jwkInstance = jwk instanceof PublicJwk ? jwk : jwk ? PublicJwk.fromUnknown(jwk) : undefined\n // Make sure the options.key and jwk from protectedHeader are the same.\n if (jwkInstance && !assymetricPublicJwkMatches(jwkInstance.toJson(), key)) {\n throw new CredoError('Protected header JWK does not match key for signing.')\n }\n\n // Validate the options.key used for signing against the jws options\n if (!publicJwk.supportedSignatureAlgorithms.includes(alg)) {\n throw new CredoError(\n `alg '${alg}' is not a valid JWA signature algorithm for this jwk with ${publicJwk.jwkTypehumanDescription}. Supported algorithms are ${publicJwk.supportedSignatureAlgorithms.join(\n ', '\n )}`\n )\n }\n\n const payload =\n options.payload instanceof JwtPayload ? JsonEncoder.toBuffer(options.payload.toJson()) : options.payload\n\n const base64Payload = TypedArrayEncoder.toBase64URL(payload)\n const base64UrlProtectedHeader = JsonEncoder.toBase64URL(this.buildProtected(options.protectedHeaderOptions))\n\n const signResult = await kms.sign({\n algorithm: alg,\n data: TypedArrayEncoder.fromString(`${base64UrlProtectedHeader}.${base64Payload}`),\n keyId: options.keyId,\n })\n const signature = TypedArrayEncoder.toBase64URL(signResult.signature)\n\n return {\n base64Payload,\n base64UrlProtectedHeader,\n signature,\n }\n }\n\n public async createJws(\n agentContext: AgentContext,\n { payload, keyId, header, protectedHeaderOptions }: CreateJwsOptions\n ): Promise<JwsGeneralFormat> {\n const { base64UrlProtectedHeader, signature, base64Payload } = await this.createJwsBase(agentContext, {\n payload,\n keyId,\n protectedHeaderOptions,\n })\n\n return {\n protected: base64UrlProtectedHeader,\n signature,\n header,\n payload: base64Payload,\n }\n }\n\n /**\n * @see {@link https://www.rfc-editor.org/rfc/rfc7515#section-3.1}\n * */\n public async createJwsCompact(\n agentContext: AgentContext,\n { payload, keyId, protectedHeaderOptions }: CreateCompactJwsOptions\n ): Promise<string> {\n const { base64Payload, base64UrlProtectedHeader, signature } = await this.createJwsBase(agentContext, {\n payload,\n keyId,\n protectedHeaderOptions,\n })\n return `${base64UrlProtectedHeader}.${base64Payload}.${signature}`\n }\n\n /**\n * Verify a JWS\n */\n public async verifyJws(\n agentContext: AgentContext,\n {\n jws,\n resolveJwsSigner,\n trustedCertificates,\n jwsSigner: expectedJwsSigner,\n allowedJwsSignerMethods = ['did', 'jwk', 'x5c'],\n }: VerifyJwsOptions\n ): Promise<VerifyJwsResult> {\n let signatures: JwsDetachedFormat[] = []\n let payload: string\n\n if (expectedJwsSigner && !allowedJwsSignerMethods.includes(expectedJwsSigner.method)) {\n throw new CredoError(\n `jwsSigner provided with method '${\n expectedJwsSigner.method\n }', but allowed jws signer methods are ${allowedJwsSignerMethods.join(', ')}.`\n )\n }\n\n if (typeof jws === 'string') {\n if (!JWS_COMPACT_FORMAT_MATCHER.test(jws)) throw new CredoError(`Invalid JWS compact format for value '${jws}'.`)\n\n const [protectedHeader, _payload, signature] = jws.split('.')\n\n payload = _payload\n signatures.push({\n header: {},\n protected: protectedHeader,\n signature,\n })\n } else if ('signatures' in jws) {\n signatures = jws.signatures\n payload = jws.payload\n } else {\n signatures.push(jws)\n payload = jws.payload\n }\n\n if (signatures.length === 0) {\n throw new CredoError('Unable to verify JWS, no signatures present in JWS.')\n }\n\n const jwsFlattened = {\n signatures,\n payload,\n } satisfies JwsFlattenedFormat\n\n const jwsSigners: JwsSignerWithJwk[] = []\n for (const jws of signatures) {\n const protectedJson = JsonEncoder.fromBase64(jws.protected)\n\n if (!isJsonObject(protectedJson)) {\n throw new CredoError('Unable to verify JWS, protected header is not a valid JSON object.')\n }\n\n if (!protectedJson.alg || typeof protectedJson.alg !== 'string') {\n throw new CredoError('Unable to verify JWS, protected header alg is not provided or not a string.')\n }\n\n const jwsSigner =\n expectedJwsSigner ??\n (await this.jwsSignerFromJws(agentContext, {\n jws,\n payload,\n protectedHeader: {\n ...protectedJson,\n alg: protectedJson.alg,\n },\n allowedJwsSignerMethods,\n resolveJwsSigner,\n }))\n\n await this.verifyJwsSigner(agentContext, {\n jwsSigner,\n trustedCertificates,\n })\n\n if (!jwsSigner.jwk.supportedSignatureAlgorithms.includes(protectedJson.alg as KnownJwaSignatureAlgorithm)) {\n throw new CredoError(\n `alg '${protectedJson.alg}' is not a valid JWA signature algorithm for this jwk ${getJwkHumanDescription(jwsSigner.jwk.toJson())}. Supported algorithms are ${jwsSigner.jwk.supportedSignatureAlgorithms.join(', ')}`\n )\n }\n\n const data = TypedArrayEncoder.fromString(`${jws.protected}.${payload}`)\n const signature = TypedArrayEncoder.fromBase64(jws.signature)\n jwsSigners.push(jwsSigner)\n\n const kms = agentContext.dependencyManager.resolve(KeyManagementApi)\n\n try {\n const { verified } = await kms.verify({\n key: {\n publicJwk: jwsSigner.jwk.toJson(),\n },\n data,\n signature,\n algorithm: protectedJson.alg as KnownJwaSignatureAlgorithm,\n })\n\n if (!verified) {\n return {\n isValid: false,\n jwsSigners: [],\n jws: jwsFlattened,\n }\n }\n } catch (error) {\n // WalletError probably means signature verification failed. Would be useful to add\n // more specific error type in kms.verify method\n if (error instanceof KeyManagementError) {\n return {\n isValid: false,\n jwsSigners: [],\n jws: jwsFlattened,\n }\n }\n\n throw error\n }\n }\n\n return { isValid: true, jwsSigners, jws: jwsFlattened }\n }\n\n private buildProtected(options: JwsProtectedHeaderOptions) {\n return {\n ...options,\n alg: options.alg,\n jwk: options.jwk instanceof PublicJwk ? options.jwk.toJson() : options.jwk,\n kid: options.kid,\n }\n }\n\n private async verifyJwsSigner(\n agentContext: AgentContext,\n options: {\n jwsSigner: JwsSignerWithJwk\n trustedCertificates?: EncodedX509Certificate[]\n }\n ) {\n const { jwsSigner } = options\n\n if (jwsSigner.method === 'x5c') {\n const trustedCertificatesFromConfig =\n agentContext.dependencyManager.resolve(X509ModuleConfig).trustedCertificates ?? []\n const trustedCertificates = options.trustedCertificates ?? trustedCertificatesFromConfig\n if (trustedCertificates.length === 0) {\n throw new CredoError(\n `trustedCertificates is required when the JWS protected header contains an 'x5c' property.`\n )\n }\n\n await X509Service.validateCertificateChain(agentContext, {\n certificateChain: jwsSigner.x5c,\n trustedCertificates,\n })\n }\n }\n\n private async jwsSignerFromJws(\n agentContext: AgentContext,\n options: {\n jws: JwsDetachedFormat\n allowedJwsSignerMethods: JwsSigner['method'][]\n protectedHeader: { alg: string; [key: string]: unknown }\n payload: string\n resolveJwsSigner?: JwsSignerResolver\n }\n ): Promise<JwsSignerWithJwk> {\n const { protectedHeader, resolveJwsSigner, jws, payload, allowedJwsSignerMethods } = options\n\n const alg = protectedHeader.alg\n if (!isKnownJwaSignatureAlgorithm(alg)) {\n throw new CredoError(`Unsupported JWA signature algorithm '${protectedHeader.alg}'`)\n }\n\n if (protectedHeader.x5c && allowedJwsSignerMethods.includes('x5c')) {\n if (\n !Array.isArray(protectedHeader.x5c) ||\n protectedHeader.x5c.some((certificate) => typeof certificate !== 'string')\n ) {\n throw new CredoError('x5c header is not a valid JSON array of strings.')\n }\n\n const certificate = X509Service.getLeafCertificate(agentContext, {\n certificateChain: protectedHeader.x5c,\n })\n return {\n method: 'x5c',\n jwk: certificate.publicJwk,\n x5c: protectedHeader.x5c,\n }\n }\n\n // Jwk\n if (protectedHeader.jwk && allowedJwsSignerMethods.includes('jwk')) {\n if (!isJsonObject(protectedHeader.jwk)) throw new CredoError('JWK is not a valid JSON object.')\n\n const protectedJwk = PublicJwk.fromUnknown(protectedHeader.jwk)\n\n return {\n method: 'jwk',\n jwk: protectedJwk,\n }\n }\n\n if (!resolveJwsSigner) {\n throw new CredoError(`resolveJwsSigner is required for resolving jws signers other than 'jwk' and 'x5c'.`)\n }\n\n try {\n const jwsSigner = await resolveJwsSigner({\n jws,\n protectedHeader: {\n ...protectedHeader,\n alg,\n },\n payload,\n })\n\n if (!allowedJwsSignerMethods.includes(jwsSigner.method)) {\n throw new CredoError(\n `resolveJwsSigner returned jws signer with method '${\n jwsSigner.method\n }', but allowed jws signer methods are ${allowedJwsSignerMethods.join(', ')}.`\n )\n }\n\n return jwsSigner\n } catch (error) {\n throw new CredoError(`Error when resolving jws signer for jws in resolveJwsSigner. ${error.message}`, {\n cause: error,\n })\n }\n }\n}\n\nexport interface CreateJwsOptions {\n payload: AnyUint8Array | JwtPayload\n keyId: string\n header: Record<string, unknown>\n protectedHeaderOptions: JwsProtectedHeaderOptions\n}\n\ntype CreateJwsBaseOptions = Omit<CreateJwsOptions, 'header'>\ntype CreateCompactJwsOptions = Omit<CreateJwsOptions, 'header'>\n\nexport interface VerifyJwsOptions {\n jws: Jws\n\n /**\n * The expected signer of the JWS. If provided the signer won't be dynamically\n * detected based on the values in the JWS.\n */\n jwsSigner?: JwsSignerWithJwk\n\n /**\n * Allowed jws signer methods when dynamically inferring the jws signer method.\n */\n allowedJwsSignerMethods?: JwsSigner['method'][]\n\n /*\n * Method that should return the JWS signer was used\n * to sign the JWS.\n *\n * This method is called by the JWS Service when it could not determine the public key.\n *\n * Currently the JWS Service can only determine the public key if the JWS protected header\n * contains a `jwk` or `x5c` property. In all other cases, it's up to the caller to resolve the public\n * key based on the JWS.\n *\n * A common use case is the `kid` property in the JWS protected header. Or determining the key\n * base on the `iss` property in the JWT payload.\n */\n resolveJwsSigner?: JwsSignerResolver\n\n trustedCertificates?: EncodedX509Certificate[]\n}\n\nexport type JwsSignerResolver = (options: {\n jws: JwsDetachedFormat\n payload: string\n protectedHeader: {\n alg: KnownJwaSignatureAlgorithm\n jwk?: string\n kid?: string\n [key: string]: unknown\n }\n}) => Promise<JwsSignerWithJwk> | JwsSignerWithJwk\n\nexport interface VerifyJwsResult {\n isValid: boolean\n jwsSigners: JwsSignerWithJwk[]\n\n jws: JwsFlattenedFormat\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA6BO,uBAAMA,aAAW;CACtB,MAAc,cAAc,cAA4B,SAA+B;EACrF,MAAM,EAAE,KAAK,KAAK,QAAQ,QAAQ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
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.js');
|
|
4
3
|
const require_CredoError = require('../error/CredoError.js');
|
|
5
4
|
require('../error/index.js');
|
|
6
5
|
require('../agent/index.js');
|
|
7
|
-
require('../utils/buffer.js');
|
|
8
6
|
const require_MessageValidator = require('../utils/MessageValidator.js');
|
|
9
7
|
const require_JsonTransformer = require('../utils/JsonTransformer.js');
|
|
10
8
|
require('../utils/index.js');
|
|
@@ -14,8 +12,6 @@ const require_VerificationMethod = require('../modules/dids/domain/verificationM
|
|
|
14
12
|
const require_keyDidMapping = require('../modules/dids/domain/key-type/keyDidMapping.js');
|
|
15
13
|
require('../modules/dids/index.js');
|
|
16
14
|
const require_LdKeyPair = require('../modules/vc/data-integrity/models/LdKeyPair.js');
|
|
17
|
-
let buffer_index_js = require("buffer/index.js");
|
|
18
|
-
buffer_index_js = require_rolldown_runtime.__toESM(buffer_index_js);
|
|
19
15
|
|
|
20
16
|
//#region src/crypto/KmsKeyPair.ts
|
|
21
17
|
function createKmsKeyPairClass(agentContext) {
|
|
@@ -66,7 +62,7 @@ function createKmsKeyPairClass(agentContext) {
|
|
|
66
62
|
if (Array.isArray(data.data)) throw new require_CredoError.CredoError("Verifying array of data entries is not supported");
|
|
67
63
|
const { verified } = await agentContext.dependencyManager.resolve(require_KeyManagementApi.KeyManagementApi).verify({
|
|
68
64
|
data: data.data,
|
|
69
|
-
signature:
|
|
65
|
+
signature: data.signature,
|
|
70
66
|
key: { publicJwk: this.publicJwk.toJson() },
|
|
71
67
|
algorithm: this.publicJwk.signatureAlgorithm
|
|
72
68
|
});
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { CredoError } from "../error/CredoError.mjs";
|
|
4
4
|
import "../error/index.mjs";
|
|
5
5
|
import "../agent/index.mjs";
|
|
6
|
-
import { Buffer } from "../utils/buffer.mjs";
|
|
7
6
|
import { MessageValidator } from "../utils/MessageValidator.mjs";
|
|
8
7
|
import { JsonTransformer } from "../utils/JsonTransformer.mjs";
|
|
9
8
|
import "../utils/index.mjs";
|
|
@@ -63,7 +62,7 @@ function createKmsKeyPairClass(agentContext) {
|
|
|
63
62
|
if (Array.isArray(data.data)) throw new CredoError("Verifying array of data entries is not supported");
|
|
64
63
|
const { verified } = await agentContext.dependencyManager.resolve(KeyManagementApi).verify({
|
|
65
64
|
data: data.data,
|
|
66
|
-
signature:
|
|
65
|
+
signature: data.signature,
|
|
67
66
|
key: { publicJwk: this.publicJwk.toJson() },
|
|
68
67
|
algorithm: this.publicJwk.signatureAlgorithm
|
|
69
68
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KmsKeyPair.mjs","names":[],"sources":["../../src/crypto/KmsKeyPair.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"KmsKeyPair.mjs","names":[],"sources":["../../src/crypto/KmsKeyPair.ts"],"sourcesContent":["import { AgentContext } from '../agent'\nimport { CredoError } from '../error'\nimport { VerificationMethod } from '../modules/dids'\nimport { getPublicJwkFromVerificationMethod } from '../modules/dids/domain/key-type/keyDidMapping'\nimport { KeyManagementApi, PublicJwk } from '../modules/kms'\nimport type { LdKeyPairOptions } from '../modules/vc/data-integrity/models/LdKeyPair'\nimport { LdKeyPair } from '../modules/vc/data-integrity/models/LdKeyPair'\nimport type { AnyUint8Array, Uint8ArrayBuffer } from '../types'\nimport { JsonTransformer, MessageValidator } from '../utils'\n\ninterface KmsKeyPairOptions extends LdKeyPairOptions {\n publicJwk: PublicJwk\n}\n\nexport function createKmsKeyPairClass(agentContext: AgentContext) {\n return class KmsKeyPair extends LdKeyPair {\n public publicJwk: PublicJwk\n public type = 'KmsKeyPair'\n\n public constructor(options: KmsKeyPairOptions) {\n super(options)\n this.publicJwk = options.publicJwk\n }\n\n public static async generate(): Promise<KmsKeyPair> {\n throw new Error('Not implemented')\n }\n\n public fingerprint(): string {\n throw new Error('Method not implemented.')\n }\n\n public verifyFingerprint(_fingerprint: string): boolean {\n throw new Error('Method not implemented.')\n }\n\n public static async from(verificationMethod: VerificationMethod): Promise<KmsKeyPair> {\n const vMethod = JsonTransformer.fromJSON(verificationMethod, VerificationMethod)\n MessageValidator.validateSync(vMethod)\n const publicJwk = getPublicJwkFromVerificationMethod(vMethod)\n\n return new KmsKeyPair({\n id: vMethod.id,\n controller: vMethod.controller,\n publicJwk,\n })\n }\n\n /**\n * This method returns a wrapped wallet.sign method. The method is being wrapped so we can covert between Uint8Array and Buffer. This is to make it compatible with the external signature libraries.\n */\n public signer(): { sign: (data: { data: AnyUint8Array | AnyUint8Array[] }) => Promise<Uint8ArrayBuffer> } {\n // wrap function for conversion\n const wrappedSign = async (data: { data: AnyUint8Array | AnyUint8Array[] }): Promise<Uint8ArrayBuffer> => {\n if (Array.isArray(data.data)) {\n throw new CredoError('Signing array of data entries is not supported')\n }\n const kms = agentContext.dependencyManager.resolve(KeyManagementApi)\n\n const result = await kms.sign({\n data: data.data,\n keyId: this.publicJwk.keyId,\n algorithm: this.publicJwk.signatureAlgorithm,\n })\n\n return result.signature\n }\n\n return {\n sign: wrappedSign.bind(this),\n }\n }\n\n /**\n * This method returns a wrapped wallet.verify method. The method is being wrapped so we can covert between Uint8Array and Buffer. This is to make it compatible with the external signature libraries.\n */\n public verifier(): {\n verify: (data: { data: AnyUint8Array | AnyUint8Array[]; signature: AnyUint8Array }) => Promise<boolean>\n } {\n const wrappedVerify = async (data: {\n data: AnyUint8Array | AnyUint8Array[]\n signature: AnyUint8Array\n }): Promise<boolean> => {\n if (Array.isArray(data.data)) {\n throw new CredoError('Verifying array of data entries is not supported')\n }\n const kms = agentContext.dependencyManager.resolve(KeyManagementApi)\n\n const { verified } = await kms.verify({\n data: data.data,\n signature: data.signature,\n key: {\n publicJwk: this.publicJwk.toJson(),\n },\n algorithm: this.publicJwk.signatureAlgorithm,\n })\n\n return verified\n }\n return {\n verify: wrappedVerify.bind(this),\n }\n }\n\n public get publicKeyBuffer(): Uint8ArrayBuffer {\n const publicKey = this.publicJwk.publicKey\n\n if (publicKey.kty === 'RSA') {\n throw new CredoError(`kty 'RSA' not supported for publicKeyBuffer`)\n }\n\n return publicKey.publicKey as Uint8ArrayBuffer\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAcA,SAAgB,sBAAsB,cAA4B;AAChE,QAAO,MAAM,mBAAmB,UAAU;EAIxC,AAAO,YAAY,SAA4B;AAC7C,SAAM,QAAQ;QAHT,OAAO;AAIZ,QAAK,YAAY,QAAQ;;EAG3B,aAAoB,WAAgC;AAClD,SAAM,IAAI,MAAM,kBAAkB;;EAGpC,AAAO,cAAsB;AAC3B,SAAM,IAAI,MAAM,0BAA0B;;EAG5C,AAAO,kBAAkB,cAA+B;AACtD,SAAM,IAAI,MAAM,0BAA0B;;EAG5C,aAAoB,KAAK,oBAA6D;GACpF,MAAM,UAAU,gBAAgB,SAAS,oBAAoB,mBAAmB;AAChF,oBAAiB,aAAa,QAAQ;GACtC,MAAM,YAAY,mCAAmC,QAAQ;AAE7D,UAAO,IAAI,WAAW;IACpB,IAAI,QAAQ;IACZ,YAAY,QAAQ;IACpB;IACD,CAAC;;;;;EAMJ,AAAO,SAAmG;GAExG,MAAM,cAAc,OAAO,SAA+E;AACxG,QAAI,MAAM,QAAQ,KAAK,KAAK,CAC1B,OAAM,IAAI,WAAW,iDAAiD;AAUxE,YANe,MAFH,aAAa,kBAAkB,QAAQ,iBAAiB,CAE3C,KAAK;KAC5B,MAAM,KAAK;KACX,OAAO,KAAK,UAAU;KACtB,WAAW,KAAK,UAAU;KAC3B,CAAC,EAEY;;AAGhB,UAAO,EACL,MAAM,YAAY,KAAK,KAAK,EAC7B;;;;;EAMH,AAAO,WAEL;GACA,MAAM,gBAAgB,OAAO,SAGL;AACtB,QAAI,MAAM,QAAQ,KAAK,KAAK,CAC1B,OAAM,IAAI,WAAW,mDAAmD;IAI1E,MAAM,EAAE,aAAa,MAFT,aAAa,kBAAkB,QAAQ,iBAAiB,CAErC,OAAO;KACpC,MAAM,KAAK;KACX,WAAW,KAAK;KAChB,KAAK,EACH,WAAW,KAAK,UAAU,QAAQ,EACnC;KACD,WAAW,KAAK,UAAU;KAC3B,CAAC;AAEF,WAAO;;AAET,UAAO,EACL,QAAQ,cAAc,KAAK,KAAK,EACjC;;EAGH,IAAW,kBAAoC;GAC7C,MAAM,YAAY,KAAK,UAAU;AAEjC,OAAI,UAAU,QAAQ,MACpB,OAAM,IAAI,WAAW,8CAA8C;AAGrE,UAAO,UAAU"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { AnyUint8Array, Uint8ArrayBuffer } from "../../types.mjs";
|
|
2
|
+
|
|
1
3
|
//#region src/crypto/hashes/Hasher.d.ts
|
|
2
|
-
type HashName = 'sha-512' | 'sha-256' | 'sha-1';
|
|
4
|
+
type HashName = 'sha-512' | 'sha-384' | 'sha-256' | 'sha-1';
|
|
3
5
|
declare class Hasher {
|
|
4
|
-
static hash(data:
|
|
6
|
+
static hash(data: AnyUint8Array | string, hashName: HashName | ({} & string)): Uint8ArrayBuffer;
|
|
5
7
|
}
|
|
6
8
|
//#endregion
|
|
7
9
|
export { HashName, Hasher };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hasher.d.mts","names":[],"sources":["../../../src/crypto/hashes/Hasher.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Hasher.d.mts","names":[],"sources":["../../../src/crypto/hashes/Hasher.ts"],"sourcesContent":[],"mappings":";;;KASY,QAAA;cAGC,MAAA;oBACc,kCAAkC,2BAA2B"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { AnyUint8Array, Uint8ArrayBuffer } from "../../types.js";
|
|
2
|
+
|
|
1
3
|
//#region src/crypto/hashes/Hasher.d.ts
|
|
2
|
-
type HashName = 'sha-512' | 'sha-256' | 'sha-1';
|
|
4
|
+
type HashName = 'sha-512' | 'sha-384' | 'sha-256' | 'sha-1';
|
|
3
5
|
declare class Hasher {
|
|
4
|
-
static hash(data:
|
|
6
|
+
static hash(data: AnyUint8Array | string, hashName: HashName | ({} & string)): Uint8ArrayBuffer;
|
|
5
7
|
}
|
|
6
8
|
//#endregion
|
|
7
9
|
export { HashName, Hasher };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hasher.d.ts","names":[],"sources":["../../../src/crypto/hashes/Hasher.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Hasher.d.ts","names":[],"sources":["../../../src/crypto/hashes/Hasher.ts"],"sourcesContent":[],"mappings":";;;KASY,QAAA;cAGC,MAAA;EAHD,OAAA,IAAQ,CAAA,IAAA,EAIO,aAJP,GAAA,MAAA,EAAA,QAAA,EAIyC,QAJzC,GAAA,CAAA,CAAA,CAAA,GAAA,MAAA,CAAA,CAAA,EAIoE,gBAJpE;AAGpB"}
|
|
@@ -2,17 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
const require_CredoError = require('../../error/CredoError.js');
|
|
4
4
|
require('../../error/index.js');
|
|
5
|
+
const require_TypedArrayEncoder = require('../../utils/TypedArrayEncoder.js');
|
|
5
6
|
const require_Sha1 = require('./Sha1.js');
|
|
6
7
|
const require_Sha256 = require('./Sha256.js');
|
|
8
|
+
const require_Sha384 = require('./Sha384.js');
|
|
7
9
|
const require_Sha512 = require('./Sha512.js');
|
|
10
|
+
require('../../utils/index.js');
|
|
8
11
|
|
|
9
12
|
//#region src/crypto/hashes/Hasher.ts
|
|
10
13
|
var Hasher = class {
|
|
11
14
|
static hash(data, hashName) {
|
|
15
|
+
const dataInput = typeof data === "string" ? require_TypedArrayEncoder.TypedArrayEncoder.fromString(data) : data;
|
|
12
16
|
switch (hashName.toUpperCase()) {
|
|
13
|
-
case "SHA-512": return new require_Sha512.Sha512().hash(
|
|
14
|
-
case "SHA-
|
|
15
|
-
case "SHA-
|
|
17
|
+
case "SHA-512": return new require_Sha512.Sha512().hash(dataInput);
|
|
18
|
+
case "SHA-384": return new require_Sha384.Sha384().hash(dataInput);
|
|
19
|
+
case "SHA-256": return new require_Sha256.Sha256().hash(dataInput);
|
|
20
|
+
case "SHA-1": return new require_Sha1.Sha1().hash(dataInput);
|
|
16
21
|
default: throw new require_CredoError.CredoError(`Hash name: '${hashName}' is not supported.`);
|
|
17
22
|
}
|
|
18
23
|
}
|
|
@@ -2,17 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
import { CredoError } from "../../error/CredoError.mjs";
|
|
4
4
|
import "../../error/index.mjs";
|
|
5
|
+
import { TypedArrayEncoder } from "../../utils/TypedArrayEncoder.mjs";
|
|
5
6
|
import { Sha1 } from "./Sha1.mjs";
|
|
6
7
|
import { Sha256 } from "./Sha256.mjs";
|
|
8
|
+
import { Sha384 } from "./Sha384.mjs";
|
|
7
9
|
import { Sha512 } from "./Sha512.mjs";
|
|
10
|
+
import "../../utils/index.mjs";
|
|
8
11
|
|
|
9
12
|
//#region src/crypto/hashes/Hasher.ts
|
|
10
13
|
var Hasher = class {
|
|
11
14
|
static hash(data, hashName) {
|
|
15
|
+
const dataInput = typeof data === "string" ? TypedArrayEncoder.fromString(data) : data;
|
|
12
16
|
switch (hashName.toUpperCase()) {
|
|
13
|
-
case "SHA-512": return new Sha512().hash(
|
|
14
|
-
case "SHA-
|
|
15
|
-
case "SHA-
|
|
17
|
+
case "SHA-512": return new Sha512().hash(dataInput);
|
|
18
|
+
case "SHA-384": return new Sha384().hash(dataInput);
|
|
19
|
+
case "SHA-256": return new Sha256().hash(dataInput);
|
|
20
|
+
case "SHA-1": return new Sha1().hash(dataInput);
|
|
16
21
|
default: throw new CredoError(`Hash name: '${hashName}' is not supported.`);
|
|
17
22
|
}
|
|
18
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hasher.mjs","names":[],"sources":["../../../src/crypto/hashes/Hasher.ts"],"sourcesContent":["import { CredoError } from '../../error'\n\nimport { Sha1 } from './Sha1'\nimport { Sha256 } from './Sha256'\nimport { Sha512 } from './Sha512'\n\nexport type HashName = 'sha-512' | 'sha-256' | 'sha-1'\n\n// biome-ignore lint/complexity/noStaticOnlyClass:
|
|
1
|
+
{"version":3,"file":"Hasher.mjs","names":[],"sources":["../../../src/crypto/hashes/Hasher.ts"],"sourcesContent":["import { CredoError } from '../../error'\nimport type { AnyUint8Array, Uint8ArrayBuffer } from '../../types'\nimport { TypedArrayEncoder } from '../../utils'\n\nimport { Sha1 } from './Sha1'\nimport { Sha256 } from './Sha256'\nimport { Sha384 } from './Sha384'\nimport { Sha512 } from './Sha512'\n\nexport type HashName = 'sha-512' | 'sha-384' | 'sha-256' | 'sha-1'\n\n// biome-ignore lint/complexity/noStaticOnlyClass: no explanation\nexport class Hasher {\n public static hash(data: AnyUint8Array | string, hashName: HashName | ({} & string)): Uint8ArrayBuffer {\n const dataInput = typeof data === 'string' ? TypedArrayEncoder.fromString(data) : data\n switch (hashName.toUpperCase()) {\n case 'SHA-512':\n return new Sha512().hash(dataInput)\n case 'SHA-384':\n return new Sha384().hash(dataInput)\n case 'SHA-256':\n return new Sha256().hash(dataInput)\n case 'SHA-1':\n return new Sha1().hash(dataInput)\n default:\n throw new CredoError(`Hash name: '${hashName}' is not supported.`)\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;AAYA,IAAa,SAAb,MAAoB;CAClB,OAAc,KAAK,MAA8B,UAAsD;EACrG,MAAM,YAAY,OAAO,SAAS,WAAW,kBAAkB,WAAW,KAAK,GAAG;AAClF,UAAQ,SAAS,aAAa,EAA9B;GACE,KAAK,UACH,QAAO,IAAI,QAAQ,CAAC,KAAK,UAAU;GACrC,KAAK,UACH,QAAO,IAAI,QAAQ,CAAC,KAAK,UAAU;GACrC,KAAK,UACH,QAAO,IAAI,QAAQ,CAAC,KAAK,UAAU;GACrC,KAAK,QACH,QAAO,IAAI,MAAM,CAAC,KAAK,UAAU;GACnC,QACE,OAAM,IAAI,WAAW,eAAe,SAAS,qBAAqB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IHash.d.mts","names":[],"sources":["../../../src/crypto/hashes/IHash.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IHash.d.mts","names":[],"sources":["../../../src/crypto/hashes/IHash.ts"],"sourcesContent":[],"mappings":";;;UAEiB,KAAA;aACJ,mBAAmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IHash.d.ts","names":[],"sources":["../../../src/crypto/hashes/IHash.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IHash.d.ts","names":[],"sources":["../../../src/crypto/hashes/IHash.ts"],"sourcesContent":[],"mappings":";;;UAEiB,KAAA;aACJ,mBAAmB;AADhC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { AnyUint8Array, Uint8ArrayBuffer } from "../../types.mjs";
|
|
1
2
|
import { IHash } from "./IHash.mjs";
|
|
2
3
|
|
|
3
4
|
//#region src/crypto/hashes/Sha1.d.ts
|
|
4
5
|
declare class Sha1 implements IHash {
|
|
5
|
-
hash(data:
|
|
6
|
+
hash(data: AnyUint8Array): Uint8ArrayBuffer;
|
|
6
7
|
}
|
|
7
8
|
//#endregion
|
|
8
9
|
export { Sha1 };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sha1.d.mts","names":[],"sources":["../../../src/crypto/hashes/Sha1.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Sha1.d.mts","names":[],"sources":["../../../src/crypto/hashes/Sha1.ts"],"sourcesContent":[],"mappings":";;;;cAIa,IAAA,YAAgB;aACT,gBAAgB"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { AnyUint8Array, Uint8ArrayBuffer } from "../../types.js";
|
|
1
2
|
import { IHash } from "./IHash.js";
|
|
2
3
|
|
|
3
4
|
//#region src/crypto/hashes/Sha1.d.ts
|
|
4
5
|
declare class Sha1 implements IHash {
|
|
5
|
-
hash(data:
|
|
6
|
+
hash(data: AnyUint8Array): Uint8ArrayBuffer;
|
|
6
7
|
}
|
|
7
8
|
//#endregion
|
|
8
9
|
export { Sha1 };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sha1.d.ts","names":[],"sources":["../../../src/crypto/hashes/Sha1.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Sha1.d.ts","names":[],"sources":["../../../src/crypto/hashes/Sha1.ts"],"sourcesContent":[],"mappings":";;;;cAIa,IAAA,YAAgB;aACT,gBAAgB;AADpC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.js');
|
|
4
|
-
let
|
|
5
|
-
|
|
4
|
+
let __noble_hashes_legacy_js = require("@noble/hashes/legacy.js");
|
|
5
|
+
__noble_hashes_legacy_js = require_rolldown_runtime.__toESM(__noble_hashes_legacy_js);
|
|
6
6
|
|
|
7
7
|
//#region src/crypto/hashes/Sha1.ts
|
|
8
8
|
var Sha1 = class {
|
|
9
9
|
hash(data) {
|
|
10
|
-
return (0,
|
|
10
|
+
return (0, __noble_hashes_legacy_js.sha1)(data);
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sha1.mjs","names":[],"sources":["../../../src/crypto/hashes/Sha1.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"Sha1.mjs","names":[],"sources":["../../../src/crypto/hashes/Sha1.ts"],"sourcesContent":["import { sha1 } from '@noble/hashes/legacy.js'\nimport type { AnyUint8Array, Uint8ArrayBuffer } from '../../types'\nimport type { IHash } from './IHash'\n\nexport class Sha1 implements IHash {\n public hash(data: AnyUint8Array): Uint8ArrayBuffer {\n return sha1(data) as Uint8ArrayBuffer\n }\n}\n"],"mappings":";;;;;AAIA,IAAa,OAAb,MAAmC;CACjC,AAAO,KAAK,MAAuC;AACjD,SAAO,KAAK,KAAK"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { AnyUint8Array, Uint8ArrayBuffer } from "../../types.mjs";
|
|
1
2
|
import { IHash } from "./IHash.mjs";
|
|
2
3
|
|
|
3
4
|
//#region src/crypto/hashes/Sha256.d.ts
|
|
4
5
|
declare class Sha256 implements IHash {
|
|
5
|
-
hash(data:
|
|
6
|
+
hash(data: AnyUint8Array): Uint8ArrayBuffer;
|
|
6
7
|
}
|
|
7
8
|
//#endregion
|
|
8
9
|
export { Sha256 };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sha256.d.mts","names":[],"sources":["../../../src/crypto/hashes/Sha256.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Sha256.d.mts","names":[],"sources":["../../../src/crypto/hashes/Sha256.ts"],"sourcesContent":[],"mappings":";;;;cAIa,MAAA,YAAkB;aACX,gBAAgB"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { AnyUint8Array, Uint8ArrayBuffer } from "../../types.js";
|
|
1
2
|
import { IHash } from "./IHash.js";
|
|
2
3
|
|
|
3
4
|
//#region src/crypto/hashes/Sha256.d.ts
|
|
4
5
|
declare class Sha256 implements IHash {
|
|
5
|
-
hash(data:
|
|
6
|
+
hash(data: AnyUint8Array): Uint8ArrayBuffer;
|
|
6
7
|
}
|
|
7
8
|
//#endregion
|
|
8
9
|
export { Sha256 };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sha256.d.ts","names":[],"sources":["../../../src/crypto/hashes/Sha256.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Sha256.d.ts","names":[],"sources":["../../../src/crypto/hashes/Sha256.ts"],"sourcesContent":[],"mappings":";;;;cAIa,MAAA,YAAkB;aACX,gBAAgB;AADpC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.js');
|
|
4
|
-
let
|
|
5
|
-
|
|
4
|
+
let __noble_hashes_sha2_js = require("@noble/hashes/sha2.js");
|
|
5
|
+
__noble_hashes_sha2_js = require_rolldown_runtime.__toESM(__noble_hashes_sha2_js);
|
|
6
6
|
|
|
7
7
|
//#region src/crypto/hashes/Sha256.ts
|
|
8
8
|
var Sha256 = class {
|
|
9
9
|
hash(data) {
|
|
10
|
-
return (0,
|
|
10
|
+
return (0, __noble_hashes_sha2_js.sha256)(data);
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sha256.mjs","names":[],"sources":["../../../src/crypto/hashes/Sha256.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"Sha256.mjs","names":[],"sources":["../../../src/crypto/hashes/Sha256.ts"],"sourcesContent":["import { sha256 } from '@noble/hashes/sha2.js'\nimport type { AnyUint8Array, Uint8ArrayBuffer } from '../../types'\nimport type { IHash } from './IHash'\n\nexport class Sha256 implements IHash {\n public hash(data: AnyUint8Array): Uint8ArrayBuffer {\n return sha256(data) as Uint8ArrayBuffer\n }\n}\n"],"mappings":";;;;;AAIA,IAAa,SAAb,MAAqC;CACnC,AAAO,KAAK,MAAuC;AACjD,SAAO,OAAO,KAAK"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AnyUint8Array, Uint8ArrayBuffer } from "../../types.mjs";
|
|
2
|
+
import { IHash } from "./IHash.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/crypto/hashes/Sha384.d.ts
|
|
5
|
+
declare class Sha384 implements IHash {
|
|
6
|
+
hash(data: AnyUint8Array): Uint8ArrayBuffer;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { Sha384 };
|
|
10
|
+
//# sourceMappingURL=Sha384.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sha384.d.mts","names":[],"sources":["../../../src/crypto/hashes/Sha384.ts"],"sourcesContent":[],"mappings":";;;;cAIa,MAAA,YAAkB;aACX,gBAAgB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AnyUint8Array, Uint8ArrayBuffer } from "../../types.js";
|
|
2
|
+
import { IHash } from "./IHash.js";
|
|
3
|
+
|
|
4
|
+
//#region src/crypto/hashes/Sha384.d.ts
|
|
5
|
+
declare class Sha384 implements IHash {
|
|
6
|
+
hash(data: AnyUint8Array): Uint8ArrayBuffer;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { Sha384 };
|
|
10
|
+
//# sourceMappingURL=Sha384.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sha384.d.ts","names":[],"sources":["../../../src/crypto/hashes/Sha384.ts"],"sourcesContent":[],"mappings":";;;;cAIa,MAAA,YAAkB;aACX,gBAAgB;AADpC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.js');
|
|
4
|
+
let __noble_hashes_sha2_js = require("@noble/hashes/sha2.js");
|
|
5
|
+
__noble_hashes_sha2_js = require_rolldown_runtime.__toESM(__noble_hashes_sha2_js);
|
|
6
|
+
|
|
7
|
+
//#region src/crypto/hashes/Sha384.ts
|
|
8
|
+
var Sha384 = class {
|
|
9
|
+
hash(data) {
|
|
10
|
+
return (0, __noble_hashes_sha2_js.sha384)(data);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
exports.Sha384 = Sha384;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sha384.mjs","names":[],"sources":["../../../src/crypto/hashes/Sha384.ts"],"sourcesContent":["import { sha384 } from '@noble/hashes/sha2.js'\nimport type { AnyUint8Array, Uint8ArrayBuffer } from '../../types'\nimport type { IHash } from './IHash'\n\nexport class Sha384 implements IHash {\n public hash(data: AnyUint8Array): Uint8ArrayBuffer {\n return sha384(data) as Uint8ArrayBuffer\n }\n}\n"],"mappings":";;;;;AAIA,IAAa,SAAb,MAAqC;CACnC,AAAO,KAAK,MAAuC;AACjD,SAAO,OAAO,KAAK"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { AnyUint8Array, Uint8ArrayBuffer } from "../../types.mjs";
|
|
1
2
|
import { IHash } from "./IHash.mjs";
|
|
2
3
|
|
|
3
4
|
//#region src/crypto/hashes/Sha512.d.ts
|
|
4
5
|
declare class Sha512 implements IHash {
|
|
5
|
-
hash(data:
|
|
6
|
+
hash(data: AnyUint8Array): Uint8ArrayBuffer;
|
|
6
7
|
}
|
|
7
8
|
//#endregion
|
|
8
9
|
export { Sha512 };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sha512.d.mts","names":[],"sources":["../../../src/crypto/hashes/Sha512.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Sha512.d.mts","names":[],"sources":["../../../src/crypto/hashes/Sha512.ts"],"sourcesContent":[],"mappings":";;;;cAIa,MAAA,YAAkB;aACX,gBAAgB"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { AnyUint8Array, Uint8ArrayBuffer } from "../../types.js";
|
|
1
2
|
import { IHash } from "./IHash.js";
|
|
2
3
|
|
|
3
4
|
//#region src/crypto/hashes/Sha512.d.ts
|
|
4
5
|
declare class Sha512 implements IHash {
|
|
5
|
-
hash(data:
|
|
6
|
+
hash(data: AnyUint8Array): Uint8ArrayBuffer;
|
|
6
7
|
}
|
|
7
8
|
//#endregion
|
|
8
9
|
export { Sha512 };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sha512.d.ts","names":[],"sources":["../../../src/crypto/hashes/Sha512.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Sha512.d.ts","names":[],"sources":["../../../src/crypto/hashes/Sha512.ts"],"sourcesContent":[],"mappings":";;;;cAIa,MAAA,YAAkB;aACX,gBAAgB;AADpC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.js');
|
|
4
|
-
let
|
|
5
|
-
|
|
4
|
+
let __noble_hashes_sha2_js = require("@noble/hashes/sha2.js");
|
|
5
|
+
__noble_hashes_sha2_js = require_rolldown_runtime.__toESM(__noble_hashes_sha2_js);
|
|
6
6
|
|
|
7
7
|
//#region src/crypto/hashes/Sha512.ts
|
|
8
8
|
var Sha512 = class {
|
|
9
9
|
hash(data) {
|
|
10
|
-
return (0,
|
|
10
|
+
return (0, __noble_hashes_sha2_js.sha512)(data);
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sha512.mjs","names":[],"sources":["../../../src/crypto/hashes/Sha512.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"Sha512.mjs","names":[],"sources":["../../../src/crypto/hashes/Sha512.ts"],"sourcesContent":["import { sha512 } from '@noble/hashes/sha2.js'\nimport type { AnyUint8Array, Uint8ArrayBuffer } from '../../types'\nimport type { IHash } from './IHash'\n\nexport class Sha512 implements IHash {\n public hash(data: AnyUint8Array): Uint8ArrayBuffer {\n return sha512(data) as Uint8ArrayBuffer\n }\n}\n"],"mappings":";;;;;AAIA,IAAa,SAAb,MAAqC;CACnC,AAAO,KAAK,MAAuC;AACjD,SAAO,OAAO,KAAK"}
|