'use strict';

var vc_presentations = require('./presentations.cjs');
var vc_credentials = require('./credentials.cjs');
var vc_presentation = require('./presentation.cjs');
var vc_verifiableCredential = require('./verifiable-credential.cjs');
var vc_verifiablePresentation = require('./verifiable-presentation.cjs');
var vc_statusList2021Credential = require('./status-list2021-credential.cjs');
var vc_privateStatusList2021Credential = require('./private-status-list2021-credential.cjs');
var vc_helpers = require('./helpers.cjs');
var vc_schema = require('./schema.cjs');
var vc_constants = require('./constants.cjs');
var vc_CredentialIssuancePurpose = require('./CredentialIssuancePurpose.cjs');
var vc_documentLoader = require('./document-loader.cjs');
var vc_jws = require('./jws.cjs');
var vc_revocation = require('./revocation.cjs');
var vc_crypto_Bls12381BBDT16KeyPairDock2024 = require('./crypto/Bls12381BBDT16KeyPairDock2024.cjs');
var vc_crypto_Bls12381BBDT16MACDock2024 = require('./crypto/Bls12381BBDT16MACDock2024.cjs');
var vc_crypto_Bls12381BBDT16MACProofDock2024 = require('./crypto/Bls12381BBDT16MACProofDock2024.cjs');
var vc_crypto_Bls12381BBSKeyPairDock2023 = require('./crypto/Bls12381BBSKeyPairDock2023.cjs');
var vc_crypto_Bls12381BBSSignatureDock2022 = require('./crypto/Bls12381BBSSignatureDock2022.cjs');
var vc_crypto_Bls12381BBSSignatureDock2023 = require('./crypto/Bls12381BBSSignatureDock2023.cjs');
var vc_crypto_Bls12381BBSSignatureProofDock2022 = require('./crypto/Bls12381BBSSignatureProofDock2022.cjs');
var vc_crypto_Bls12381BBSSignatureProofDock2023 = require('./crypto/Bls12381BBSSignatureProofDock2023.cjs');
var vc_crypto_Bls12381BDDT16KeyPairDock2024 = require('./crypto/Bls12381BDDT16KeyPairDock2024.cjs');
var vc_crypto_Bls12381BDDT16MACDock2024 = require('./crypto/Bls12381BDDT16MACDock2024.cjs');
var vc_crypto_Bls12381BDDT16MACProofDock2024 = require('./crypto/Bls12381BDDT16MACProofDock2024.cjs');
var vc_crypto_Bls12381G2KeyPairDock2022 = require('./crypto/Bls12381G2KeyPairDock2022.cjs');
var vc_crypto_Bls12381PSKeyPairDock2023 = require('./crypto/Bls12381PSKeyPairDock2023.cjs');
var vc_crypto_Bls12381PSSignatureDock2023 = require('./crypto/Bls12381PSSignatureDock2023.cjs');
var vc_crypto_Bls12381PSSignatureProofDock2023 = require('./crypto/Bls12381PSSignatureProofDock2023.cjs');
var vc_crypto_EcdsaSecp256k1Signature2019 = require('./crypto/EcdsaSecp256k1Signature2019.cjs');
var vc_crypto_EcdsaSecp256k1VerificationKey2019 = require('./crypto/EcdsaSecp256k1VerificationKey2019.cjs');
var vc_crypto_Ed25519Signature2018 = require('./crypto/Ed25519Signature2018.cjs');
var vc_crypto_Ed25519Signature2020 = require('./crypto/Ed25519Signature2020.cjs');
var vc_crypto_Ed25519VerificationKey2018 = require('./crypto/Ed25519VerificationKey2018.cjs');
var vc_crypto_Ed25519VerificationKey2020 = require('./crypto/Ed25519VerificationKey2020.cjs');
var vc_crypto_JsonWebSignature2020 = require('./crypto/JsonWebSignature2020.cjs');
var vc_crypto_common_CustomLinkedDataSignature = require('./crypto/common/CustomLinkedDataSignature.cjs');
var vc_crypto_constants = require('./crypto/constants.cjs');
require('jsonld');
require('jsonld-signatures');
require('@docknetwork/crypto-wasm-ts');
require('bs58');
require('@docknetwork/vc-delegation-engine');
require('./crypto/common/DockCryptoSignature.cjs');
require('json-stringify-deterministic');
require('semver/preload.js');
require('../utils/types/bytes.cjs');
require('crypto');
require('../utils/interfaces.cjs');
require('../utils/assert.cjs');
require('../utils/error.cjs');
require('../utils/types/string.cjs');
require('../utils/types/iterable.cjs');
require('../utils/types/object.cjs');
require('../utils/inheritance.cjs');
require('../utils/types/set.cjs');
require('../utils/types/array.cjs');
require('multiformats/bases/base58');
require('varint');
require('../utils/encoding/ss-58.cjs');
require('blake2b');
require('base64url');
require('../types/did/document/verification-method-ref.cjs');
require('../types/generic/typed-enum.cjs');
require('../types/generic/with-base.cjs');
require('../types/generic/with-catch-null.cjs');
require('../types/generic/with-eq.cjs');
require('../types/generic/any-of.cjs');
require('../types/generic/with-from.cjs');
require('../types/generic/with-from-json-bytes.cjs');
require('../types/generic/typed-null.cjs');
require('../types/generic/create-placeholder.cjs');
require('../types/generic/typed-bytes.cjs');
require('../types/generic/typed-string.cjs');
require('../types/generic/typed-array.cjs');
require('../types/generic/typed-tuple.cjs');
require('../types/generic/typed-number.cjs');
require('../types/generic/typed-set.cjs');
require('../types/generic/typed-map.cjs');
require('../types/generic/typed-struct.cjs');
require('uuid');
require('js-sha256');
require('../types/generic/with-qualifier.cjs');
require('../types/generic/utils.cjs');
require('../types/generic/typed-bytes-array.cjs');
require('../types/did/onchain/typed-did/index.cjs');
require('../types/did/onchain/typed-did/did-method-key/did-method-key-public-key.cjs');
require('../utils/encoding/base-58-btc.cjs');
require('../types/generic/sized.cjs');
require('../utils/types/number.cjs');
require('../types/public-keys/public-key.cjs');
require('../types/public-keys/public-key-x25519-value.cjs');
require('../types/public-keys/public-key-ed25519-value.cjs');
require('../types/public-keys/public-key-secp256k1-value.cjs');
require('../types/public-keys/public-key-sr25519-value.cjs');
require('../types/did/onchain/constants.cjs');
require('../types/did/onchain/typed-did/signature.cjs');
require('../types/did/onchain/typed-did/did-method-key/did-method-key-signature.cjs');
require('../types/signatures/signature-value.cjs');
require('../types/signatures/signature-ed25519-value.cjs');
require('../types/signatures/signature-secp256k1-value.cjs');
require('../types/signatures/signature.cjs');
require('../types/signatures/signature-sr25519-value.cjs');
require('../types/did/onchain/typed-did/dock-did-value.cjs');
require('../types/generic/typed-uuid.cjs');
require('../types/did/onchain/typed-did/cheqd-did.cjs');
require('@juanelas/base64');
require('../keypairs/keypair-secp256k1.cjs');
require('elliptic');
require('../keypairs/dock-keypair.cjs');
require('@stablelib/ed25519');
require('@digitalcredentials/vc-status-list');
require('@transmute/json-web-signature');
require('./contexts.cjs');
require('./contexts/vc-examples-v1.cjs');
require('./contexts/security_context.cjs');
require('./contexts/status-list-21.cjs');
require('./contexts/private-status-list-21.cjs');
require('../utils/json-fetch.cjs');
require('./crypto/common/DockCryptoKeyPair.cjs');
require('@docknetwork/crypto-wasm-ts/lib/index.js');
require('./crypto/common/DockCryptoSignatureProof.cjs');
require('../utils/encoding/multibase.cjs');
require('../keypairs/keypair-ed25519.cjs');
require('../keypairs/did-keypair.cjs');
require('../types/did/onchain/did-key.cjs');
require('../types/offchain-signatures/params/index.cjs');
require('../types/offchain-signatures/params/value.cjs');
require('../types/generic/option.cjs');
require('../types/offchain-signatures/curve-type.cjs');
require('../types/offchain-signatures/params/id.cjs');
require('../types/generic/with-from-dock-id.cjs');
require('../types/offchain-signatures/public-keys/index.cjs');
require('../types/generic/with-prop.cjs');
require('../types/generic/with-props.cjs');
require('../types/offchain-signatures/public-keys/value.cjs');
require('../types/offchain-signatures/public-keys/ref.cjs');
require('../types/offchain-signatures/public-keys/id.cjs');
require('../types/did/onchain/verification-relationship.cjs');
require('../types/did/document/verification-method-ref-or-ident-ref.cjs');
require('../types/did/document/ident-ref.cjs');
require('jsonschema');
require('blakejs');
require('../utils/ident/ensure-ident.cjs');
require('../utils/ident/matchers.cjs');
require('pako');

/**
 * Check that credential is verified, i.e. the credential has VCDM compliant structure and the `proof`
 * (signature by issuer) is correct.
 * @param {object} [credential] The credential to verify
 * @param {object} [params] Verify parameters (TODO: add type info for this object)
 * @returns {Promise<boolean>} Returns promise that resolves to true if credential is valid and not revoked and false otherwise
 */
async function isVerifiedCredential(credential, params) {
  const result = await vc_credentials.verifyCredential(credential, params);
  return result.verified;
}

/**
 * Check that presentation is verified, i.e. the presentation and credentials have VCDM compliant structure and
 * the `proof` (signature by holder) is correct.
 * @param {object} [params] Verify parameters (TODO: add type info for this object)
 * @returns {Promise<boolean>} - Returns promise that resolves to true if the
 * presentation is valid and all the credentials are valid and not revoked and false otherwise. The `error` will
 * describe the error if any.
 */
async function isVerifiedPresentation(presentation, params) {
  const result = await vc_presentations.verifyPresentation(presentation, params);
  return result.verified;
}

exports.getJsonSchemasFromPresentation = vc_presentations.getJsonSchemasFromPresentation;
exports.getKeyedProofsFromVerifiedPresentation = vc_presentations.getKeyedProofsFromVerifiedPresentation;
exports.getPrivateStatuses = vc_presentations.getPrivateStatuses;
exports.isAnoncreds = vc_presentations.isAnoncreds;
exports.signPresentation = vc_presentations.signPresentation;
exports.verifyAnoncreds = vc_presentations.verifyAnoncreds;
exports.verifyPresentation = vc_presentations.verifyPresentation;
exports.verifyPresentationCredentials = vc_presentations.verifyPresentationCredentials;
exports.VC_ISSUE_TYPE_DEFAULT = vc_credentials.VC_ISSUE_TYPE_DEFAULT;
exports.VC_ISSUE_TYPE_JSONLD = vc_credentials.VC_ISSUE_TYPE_JSONLD;
exports.VC_ISSUE_TYPE_JWT = vc_credentials.VC_ISSUE_TYPE_JWT;
exports.VC_ISSUE_TYPE_PROOFVALUE = vc_credentials.VC_ISSUE_TYPE_PROOFVALUE;
exports.addPrivateStatusListEntryToCredential = vc_credentials.addPrivateStatusListEntryToCredential;
exports.addRevRegIdToCredential = vc_credentials.addRevRegIdToCredential;
exports.addStatusList21EntryToCredential = vc_credentials.addStatusList21EntryToCredential;
exports.checkCredential = vc_credentials.checkCredential;
exports.checkCredentialJSONLD = vc_credentials.checkCredentialJSONLD;
exports.checkCredentialOptional = vc_credentials.checkCredentialOptional;
exports.checkCredentialRequired = vc_credentials.checkCredentialRequired;
exports.formatToJWTPayload = vc_credentials.formatToJWTPayload;
exports.getJsonSchemaFromCredential = vc_credentials.getJsonSchemaFromCredential;
exports.getPrivateStatus = vc_credentials.getPrivateStatus;
exports.isAnoncredsProofType = vc_credentials.isAnoncredsProofType;
exports.issueCredential = vc_credentials.issueCredential;
exports.verifyCredential = vc_credentials.verifyCredential;
exports.verifyPrivateStatus = vc_credentials.verifyPrivateStatus;
exports.Presentation = vc_presentation;
exports.VerifiableCredential = vc_verifiableCredential;
exports.VerifiablePresentation = vc_verifiablePresentation;
exports.StatusList2021Credential = vc_statusList2021Credential;
exports.PrivateStatusList2021Credential = vc_privateStatusList2021Credential;
exports.expandJSONLD = vc_helpers.expandJSONLD;
exports.getKeyDoc = vc_helpers.getKeyDoc;
exports.getKeyFromDIDDocument = vc_helpers.getKeyFromDIDDocument;
exports.getSuiteFromKeyDoc = vc_helpers.getSuiteFromKeyDoc;
exports.potentialToArray = vc_helpers.potentialToArray;
exports.processIfKvac = vc_helpers.processIfKvac;
exports.verMethodRefsEqual = vc_helpers.verMethodRefsEqual;
exports.getAndValidateSchemaIfPresent = vc_schema.getAndValidateSchemaIfPresent;
exports.validateCredentialSchema = vc_schema.validateCredentialSchema;
exports.CheqdStatusList2021Qualifier = vc_constants.CheqdStatusList2021Qualifier;
exports.DEFAULT_CONTEXT = vc_constants.DEFAULT_CONTEXT;
exports.DEFAULT_CONTEXT_URL = vc_constants.DEFAULT_CONTEXT_URL;
exports.DEFAULT_CONTEXT_V1_URL = vc_constants.DEFAULT_CONTEXT_V1_URL;
exports.DEFAULT_TYPE = vc_constants.DEFAULT_TYPE;
exports.DockRevRegQualifier = vc_constants.DockRevRegQualifier;
exports.DockStatusList2021Qualifier = vc_constants.DockStatusList2021Qualifier;
exports.PrivateStatusList2021EntryType = vc_constants.PrivateStatusList2021EntryType;
exports.PrivateStatusList2021Qualifier = vc_constants.PrivateStatusList2021Qualifier;
exports.RevRegType = vc_constants.RevRegType;
exports.StatusList2021EntryType = vc_constants.StatusList2021EntryType;
exports.credentialContextField = vc_constants.credentialContextField;
exports.credentialIDField = vc_constants.credentialIDField;
exports.credentialTypeField = vc_constants.credentialTypeField;
exports.expandedCredentialProperty = vc_constants.expandedCredentialProperty;
exports.expandedSchemaProperty = vc_constants.expandedSchemaProperty;
exports.expandedStatusProperty = vc_constants.expandedStatusProperty;
exports.expandedSubjectProperty = vc_constants.expandedSubjectProperty;
exports.CredentialIssuancePurpose = vc_CredentialIssuancePurpose;
exports.documentLoader = vc_documentLoader;
exports.createJws = vc_jws.createJws;
exports.signJWS = vc_jws.signJWS;
exports.RevEntryByteSize = vc_revocation.RevEntryByteSize;
exports.RevRegIdByteSize = vc_revocation.RevRegIdByteSize;
exports.buildDockCredentialStatus = vc_revocation.buildDockCredentialStatus;
exports.checkRevocationRegistryStatus = vc_revocation.checkRevocationRegistryStatus;
exports.createRandomRegistryId = vc_revocation.createRandomRegistryId;
exports.getCredentialStatus = vc_revocation.getCredentialStatus;
exports.getDockRevIdFromCredential = vc_revocation.getDockRevIdFromCredential;
exports.hasRegistryRevocationStatus = vc_revocation.hasRegistryRevocationStatus;
exports.isAccumulatorRevocationStatus = vc_revocation.isAccumulatorRevocationStatus;
exports.isRegistryRevocationStatus = vc_revocation.isRegistryRevocationStatus;
exports.Bls12381BBDT16KeyPairDock2024 = vc_crypto_Bls12381BBDT16KeyPairDock2024;
exports.Bls12381BBDT16MACDock2024 = vc_crypto_Bls12381BBDT16MACDock2024;
exports.Bls12381BBDT16MACProofDock2024 = vc_crypto_Bls12381BBDT16MACProofDock2024;
exports.Bls12381BBSKeyPairDock2023 = vc_crypto_Bls12381BBSKeyPairDock2023;
exports.Bls12381BBSSignatureDock2022 = vc_crypto_Bls12381BBSSignatureDock2022;
exports.Bls12381BBSSignatureDock2023 = vc_crypto_Bls12381BBSSignatureDock2023;
exports.Bls12381BBSSignatureProofDock2022 = vc_crypto_Bls12381BBSSignatureProofDock2022;
exports.Bls12381BBSSignatureProofDock2023 = vc_crypto_Bls12381BBSSignatureProofDock2023;
exports.Bls12381BDDT16KeyPairDock2024 = vc_crypto_Bls12381BDDT16KeyPairDock2024;
exports.Bls12381BDDT16MACDock2024 = vc_crypto_Bls12381BDDT16MACDock2024;
exports.Bls12381BDDT16MACProofDock2024 = vc_crypto_Bls12381BDDT16MACProofDock2024;
exports.Bls12381G2KeyPairDock2022 = vc_crypto_Bls12381G2KeyPairDock2022;
exports.Bls12381PSKeyPairDock2023 = vc_crypto_Bls12381PSKeyPairDock2023;
exports.Bls12381PSSignatureDock2023 = vc_crypto_Bls12381PSSignatureDock2023;
exports.Bls12381PSSignatureProofDock2023 = vc_crypto_Bls12381PSSignatureProofDock2023;
exports.EcdsaSecp256k1Signature2019 = vc_crypto_EcdsaSecp256k1Signature2019;
exports.EcdsaSecp256k1VerificationKey2019 = vc_crypto_EcdsaSecp256k1VerificationKey2019;
exports.Ed25519Signature2018 = vc_crypto_Ed25519Signature2018;
exports.Ed25519Signature2020 = vc_crypto_Ed25519Signature2020;
exports.Ed25519VerificationKey2018 = vc_crypto_Ed25519VerificationKey2018;
exports.Ed25519VerificationKey2020 = vc_crypto_Ed25519VerificationKey2020;
exports.JsonWebSignature2020 = vc_crypto_JsonWebSignature2020;
exports.CustomLinkedDataSignature = vc_crypto_common_CustomLinkedDataSignature.default;
exports.Bls12381BBDT16DockVerKeyName = vc_crypto_constants.Bls12381BBDT16DockVerKeyName;
exports.Bls12381BBDT16MacDockName = vc_crypto_constants.Bls12381BBDT16MacDockName;
exports.Bls12381BBDT16MacProofDockName = vc_crypto_constants.Bls12381BBDT16MacProofDockName;
exports.Bls12381BBS23DockVerKeyName = vc_crypto_constants.Bls12381BBS23DockVerKeyName;
exports.Bls12381BBS23SigDockSigName = vc_crypto_constants.Bls12381BBS23SigDockSigName;
exports.Bls12381BBS23SigProofDockSigName = vc_crypto_constants.Bls12381BBS23SigProofDockSigName;
exports.Bls12381BBSDockVerKeyName = vc_crypto_constants.Bls12381BBSDockVerKeyName;
exports.Bls12381BBSSigDockSigName = vc_crypto_constants.Bls12381BBSSigDockSigName;
exports.Bls12381BBSSigProofDockSigName = vc_crypto_constants.Bls12381BBSSigProofDockSigName;
exports.Bls12381PSDockVerKeyName = vc_crypto_constants.Bls12381PSDockVerKeyName;
exports.Bls12381PSSigDockSigName = vc_crypto_constants.Bls12381PSSigDockSigName;
exports.Bls12381PSSigProofDockSigName = vc_crypto_constants.Bls12381PSSigProofDockSigName;
exports.EcdsaSecp256k1SigName = vc_crypto_constants.EcdsaSecp256k1SigName;
exports.EcdsaSecp256k1VerKeyName = vc_crypto_constants.EcdsaSecp256k1VerKeyName;
exports.Ed255192020SigName = vc_crypto_constants.Ed255192020SigName;
exports.Ed255192020VerKeyName = vc_crypto_constants.Ed255192020VerKeyName;
exports.Ed25519SigName = vc_crypto_constants.Ed25519SigName;
exports.Ed25519VerKeyName = vc_crypto_constants.Ed25519VerKeyName;
exports.JsonWebKey2020VerKeyName = vc_crypto_constants.JsonWebKey2020VerKeyName;
exports.Sr25519SigName = vc_crypto_constants.Sr25519SigName;
exports.Sr25519VerKeyName = vc_crypto_constants.Sr25519VerKeyName;
exports.isVerifiedCredential = isVerifiedCredential;
exports.isVerifiedPresentation = isVerifiedPresentation;
//# sourceMappingURL=index.cjs.map
