import '../../utils/types/array.js';
import 'crypto';
import { withExtendedStaticProperties, ensurePrototypeOf } from '../../utils/inheritance.js';
import 'bs58';
import 'multiformats/bases/base58';
import 'varint';
import '../../utils/encoding/ss-58.js';
import AbstractAccumulatorModule from './accumulator/module.js';
export { AccumulatorType } from './accumulator/module.js';
import AbstractAnchorModule from './anchor/module.js';
import AbstractAttestModule from './attest/module.js';
import AbstractBlobModule from './blob/module.js';
export { default as AbstractApiProvider } from './common/abstract-api-provider.js';
import AbstractBaseModule from './common/abstract-base-module.js';
import AbstractDIDModule from './did/module.js';
import AbstractOffchainSignaturesModule from './offchain-signatures/module.js';
import AbstractStatusListCredentialModule from './status-list-credential/module.js';
import AbstractTrustRegistryModule from './trust-registry/module.js';
export { default as Schema } from './schema/module.js';
import '../../utils/types/object.js';
import '../../utils/types/iterable.js';
import '../../utils/types/set.js';
import 'blake2b';
import '../../utils/types/bytes.js';
import '../../utils/interfaces.js';
import '../../utils/assert.js';
import '../../utils/error.js';
import '../../utils/types/string.js';
import '@docknetwork/crypto-wasm-ts';
import './common/with-abstract-params.js';
import './common/with-abstract-public-keys.js';
import '../../types/blob/index.js';
import '../../types/generic/typed-enum.js';
import '../../types/generic/with-base.js';
import '../../types/generic/with-catch-null.js';
import '../../types/generic/with-eq.js';
import '../../types/generic/any-of.js';
import '../../types/generic/with-from.js';
import '../../types/generic/with-from-json-bytes.js';
import '../../types/generic/typed-null.js';
import '../../types/generic/create-placeholder.js';
import '../../types/generic/typed-bytes.js';
import '../../types/generic/typed-string.js';
import '../../types/generic/typed-array.js';
import '../../types/generic/typed-tuple.js';
import '../../types/generic/typed-number.js';
import '../../types/generic/typed-set.js';
import '../../types/generic/typed-map.js';
import '../../types/generic/typed-struct.js';
import 'uuid';
import 'js-sha256';
import '../../types/generic/with-prop.js';
import '../../types/generic/with-props.js';
import '../../types/blob/id.js';
import '../../types/generic/sized.js';
import '../../utils/types/number.js';
import '../../types/generic/typed-uuid.js';
import '../../types/generic/with-qualifier.js';
import '../../types/generic/with-from-dock-id.js';
import '../../types/did/onchain/typed-did/index.js';
import '../../types/did/onchain/typed-did/did-method-key/did-method-key-public-key.js';
import '../../utils/encoding/base-58-btc.js';
import '../../types/public-keys/public-key.js';
import '../../types/public-keys/public-key-x25519-value.js';
import '../../types/public-keys/public-key-ed25519-value.js';
import '../../vc/crypto/constants.js';
import '../../types/public-keys/public-key-secp256k1-value.js';
import '../../types/public-keys/public-key-sr25519-value.js';
import '../../types/did/onchain/constants.js';
import '../../types/did/onchain/typed-did/signature.js';
import '../../types/did/onchain/typed-did/did-method-key/did-method-key-signature.js';
import '../../types/signatures/signature-value.js';
import '../../types/signatures/signature-ed25519-value.js';
import '../../types/signatures/signature-secp256k1-value.js';
import '../../types/signatures/signature.js';
import '../../types/signatures/signature-sr25519-value.js';
import '../../types/did/onchain/typed-did/dock-did-value.js';
import '../../types/generic/utils.js';
import '../../types/generic/typed-bytes-array.js';
import '../../types/did/onchain/typed-did/cheqd-did.js';
import '../../types/blob/const.js';
import '../../types/did/index.js';
import '../../types/did/offchain/index.js';
import '../../types/did/offchain/doc-ref.js';
import '../../types/did/onchain/index.js';
import '../../types/did/onchain/controllers.js';
import '../../types/did/onchain/verification-relationship.js';
import '../../types/did/onchain/did-key.js';
import '../../types/offchain-signatures/params/index.js';
import '../../types/offchain-signatures/params/value.js';
import '../../types/generic/option.js';
import '../../types/offchain-signatures/curve-type.js';
import '../../types/offchain-signatures/params/id.js';
import '../../types/offchain-signatures/public-keys/index.js';
import '../../vc/crypto/Bls12381BBDT16KeyPairDock2024.js';
import '../../vc/crypto/common/DockCryptoKeyPair.js';
import '../../vc/crypto/Bls12381BBDT16MACDock2024.js';
import '@docknetwork/crypto-wasm-ts/lib/index.js';
import '../../vc/crypto/common/DockCryptoSignature.js';
import 'jsonld-signatures';
import 'json-stringify-deterministic';
import 'semver/preload.js';
import '../../vc/crypto/common/CustomLinkedDataSignature.js';
import 'base64url';
import 'jsonld';
import '../../types/did/document/verification-method-ref.js';
import '../../vc/jws.js';
import '../../vc/crypto/Bls12381BBDT16MACProofDock2024.js';
import '../../vc/crypto/common/DockCryptoSignatureProof.js';
import '../../vc/crypto/Bls12381BBSKeyPairDock2023.js';
import '../../vc/crypto/Bls12381BBSSignatureDock2022.js';
import '../../vc/crypto/Bls12381G2KeyPairDock2022.js';
import '../../vc/crypto/Bls12381BBSSignatureDock2023.js';
import '../../vc/crypto/Bls12381BBSSignatureProofDock2022.js';
import '../../vc/crypto/Bls12381BBSSignatureProofDock2023.js';
import '../../vc/crypto/Bls12381BDDT16KeyPairDock2024.js';
import '../../vc/crypto/Bls12381BDDT16MACDock2024.js';
import '../../vc/crypto/Bls12381BDDT16MACProofDock2024.js';
import '../../vc/crypto/Bls12381PSKeyPairDock2023.js';
import '../../vc/crypto/Bls12381PSSignatureDock2023.js';
import '../../vc/crypto/Bls12381PSSignatureProofDock2023.js';
import '@juanelas/base64';
import '../../keypairs/keypair-secp256k1.js';
import 'elliptic';
import '../../keypairs/dock-keypair.js';
import '@stablelib/ed25519';
import '@transmute/json-web-signature';
import '../../types/offchain-signatures/public-keys/value.js';
import '../../types/offchain-signatures/public-keys/ref.js';
import '../../types/offchain-signatures/public-keys/id.js';
import '../../types/did/onchain/verification-method-signature.js';
import '../../keypairs/did-keypair.js';
import '../../types/did/document/verification-method-ref-or-ident-ref.js';
import '../../types/did/document/ident-ref.js';
import '../../types/did/document/index.js';
import '../../types/did/document/service-endpoint.js';
import '../../types/did/document/verification-method.js';
import '../../utils/encoding/base-58.js';
import '../../types/generic/with-base58.js';
import '../../types/generic/with-base58btc.js';
import '../../types/generic/with-multibase.js';
import '../../utils/encoding/multibase.js';
import '../../types/did/document/verification-method-type.js';
import '../../types/did/document/verification-method-ref-or-cheqd-verification-method.js';
import '../../types/did/document/const.js';
import '../../utils/mappings/dock-did-by-id.js';
import '../../types/blob/blob.js';
import '../../types/attest/index.js';
import '../../types/payload/cheqd.js';
import '../../types/policy/index.js';
import '../../types/policy/one-of-policy-value.js';
import '../../types/status-list-credential/index.js';
import '../../types/status-list-credential/status-list-credential-value.js';
import '../../vc/status-list2021-credential.js';
import '@digitalcredentials/vc-status-list';
import 'pako';
import '../../vc/verifiable-credential.js';
import '../../vc/helpers.js';
import '../../vc/document-loader.js';
import '../../vc/contexts.js';
import '../../vc/contexts/vc-examples-v1.js';
import '../../vc/contexts/security_context.js';
import '../../vc/contexts/status-list-21.js';
import '../../vc/contexts/private-status-list-21.js';
import '../../utils/json-fetch.js';
import '../../vc/crypto/EcdsaSecp256k1Signature2019.js';
import '../../vc/crypto/EcdsaSecp256k1VerificationKey2019.js';
import '../../vc/crypto/Ed25519Signature2018.js';
import '../../vc/crypto/Ed25519VerificationKey2018.js';
import '../../keypairs/keypair-ed25519.js';
import '../../vc/crypto/Ed25519Signature2020.js';
import '../../vc/crypto/Ed25519VerificationKey2020.js';
import '../../vc/crypto/JsonWebSignature2020.js';
import '../../vc/credentials.js';
import '../../vc/CredentialIssuancePurpose.js';
import '../../vc/schema.js';
import 'jsonschema';
import '../../vc/constants.js';
import '../../vc/revocation.js';
import 'blakejs';
import '../../utils/ident/ensure-ident.js';
import '../../utils/ident/matchers.js';
import '../../types/status-list-credential/id.js';
import '../../types/anchor/index.js';
import '../../types/accumulator/keys.js';
import '../../types/accumulator/params.js';
import '../../types/accumulator/public-key.js';
import '../../types/accumulator/accumulator.js';
import '../../types/accumulator/variants.js';
import '../../types/accumulator/id.js';
import '../../types/trust-registry/id.js';
import 'mrklt';
import 'json-canonicalize';
import '../../vc/schemas/schema-draft-07.js';

/**
 * Class representing a set of core modules each of which is an instance of its respective abstract module.
 */
const AbstractCoreModules = withExtendedStaticProperties(
  [
    'AccumulatorModule',
    'AnchorModule',
    'AttestModule',
    'BlobModule',
    'DIDModule',
    'OffchainSignaturesModule',
    'BBSModule',
    'BBSPlusModule',
    'PSModule',
    'StatusListCredentialModule',
    'TrustRegistryModule',
  ],
  class AbstractCoreModules extends AbstractBaseModule {
    static AccumulatorModule = AbstractAccumulatorModule;

    static AnchorModule = AbstractAnchorModule;

    static AttestModule = AbstractAttestModule;

    static BlobModule = AbstractBlobModule;

    static DIDModule = AbstractDIDModule;

    static OffchainSignaturesModule = AbstractOffchainSignaturesModule;

    static BBSModule = AbstractOffchainSignaturesModule;

    static BBSPlusModule = AbstractOffchainSignaturesModule;

    static PSModule = AbstractOffchainSignaturesModule;

    static StatusListCredentialModule = AbstractStatusListCredentialModule;

    static TrustRegistryModule = AbstractTrustRegistryModule;

    static ModuleMap = {
      AccumulatorModule: { key: 'accumulator', optional: false },
      AnchorModule: { key: 'anchor', optional: true },
      AttestModule: { key: 'attest', optional: false },
      BlobModule: { key: 'blob', optional: false },
      DIDModule: { key: 'did', optional: false },
      OffchainSignaturesModule: {
        key: 'offchainSignatures',
        optional: false,
      },
      BBSModule: { key: 'bbs', optional: false },
      BBSPlusModule: { key: 'bbsPlus', optional: false },
      PSModule: { key: 'ps', optional: false },
      StatusListCredentialModule: {
        key: 'statusListCredential',
        optional: false,
      },
      TrustRegistryModule: { key: 'trustRegistry', optional: false },
    };

    constructor(...args) {
      super();

      for (const [prop, key] of Object.entries(this.constructor.ModuleMap)) {
        this.attachModule(prop, key, args);
      }
    }

    attachModule(prop, { key, optional }, args) {
      const { [prop]: Module } = this.constructor;

      if (Module == null) {
        if (optional) {
          return this;
        }

        throw new Error(`No such module: ${prop}`);
      }

      ensurePrototypeOf(AbstractCoreModules[prop], Module);
      this[key] = new Module(...args);

      return this;
    }

    methods() {
      return this.apiProvider.methods();
    }
  },
);

export { AbstractAccumulatorModule, AbstractAnchorModule, AbstractAttestModule, AbstractBlobModule, AbstractCoreModules, AbstractDIDModule, AbstractOffchainSignaturesModule, AbstractStatusListCredentialModule, AbstractTrustRegistryModule };
//# sourceMappingURL=index.js.map
