'use strict';

require('../../generic/typed-enum.cjs');
require('../../generic/typed-bytes.cjs');
var types_generic_typedString = require('../../generic/typed-string.cjs');
var types_generic_typedArray = require('../../generic/typed-array.cjs');
require('../../generic/typed-tuple.cjs');
require('../../generic/typed-null.cjs');
var types_generic_option = require('../../generic/option.cjs');
require('../../../utils/types/array.cjs');
require('crypto');
var utils_inheritance = require('../../../utils/inheritance.cjs');
require('bs58');
require('multiformats/bases/base58');
require('varint');
require('../../../utils/encoding/ss-58.cjs');
var types_generic_typedNumber = require('../../generic/typed-number.cjs');
var types_generic_typedSet = require('../../generic/typed-set.cjs');
require('../../generic/typed-map.cjs');
var types_generic_typedStruct = require('../../generic/typed-struct.cjs');
var types_generic_typedUuid = require('../../generic/typed-uuid.cjs');
var types_generic_withFrom = require('../../generic/with-from.cjs');
var types_did_onchain_typedDid_index = require('../onchain/typed-did/index.cjs');
var types_did_onchain_didKey = require('../onchain/did-key.cjs');
var types_did_onchain_verificationRelationship = require('../onchain/verification-relationship.cjs');
var types_did_document_serviceEndpoint = require('./service-endpoint.cjs');
var types_did_document_verificationMethod = require('./verification-method.cjs');
var types_did_document_verificationMethodRefOrCheqdVerificationMethod = require('./verification-method-ref-or-cheqd-verification-method.cjs');
var types_did_document_verificationMethodRef = require('./verification-method-ref.cjs');
var types_did_document_const = require('./const.cjs');
var types_did_document_verificationMethodType = require('./verification-method-type.cjs');
var types_did_document_identRef = require('./ident-ref.cjs');
var types_did_onchain_typedDid_cheqdDid = require('../onchain/typed-did/cheqd-did.cjs');
require('../../../utils/types/iterable.cjs');
require('../../../utils/types/object.cjs');
require('../../../utils/interfaces.cjs');
require('../../../utils/assert.cjs');
require('../../../utils/error.cjs');
require('../../generic/with-base.cjs');
require('../../../utils/types/bytes.cjs');
require('../../../utils/types/string.cjs');
require('../../../utils/types/set.cjs');
require('../../generic/with-catch-null.cjs');
require('../../generic/with-eq.cjs');
require('../../generic/any-of.cjs');
require('blake2b');
require('../../generic/with-from-json-bytes.cjs');
require('../../generic/create-placeholder.cjs');
require('uuid');
require('js-sha256');
require('../onchain/typed-did/did-method-key/did-method-key-public-key.cjs');
require('../../../utils/encoding/base-58-btc.cjs');
require('../../generic/sized.cjs');
require('../../../utils/types/number.cjs');
require('../../generic/with-qualifier.cjs');
require('../../public-keys/public-key.cjs');
require('../../public-keys/public-key-x25519-value.cjs');
require('../../public-keys/public-key-ed25519-value.cjs');
require('../../../vc/crypto/constants.cjs');
require('../../public-keys/public-key-secp256k1-value.cjs');
require('../../public-keys/public-key-sr25519-value.cjs');
require('../onchain/constants.cjs');
require('../onchain/typed-did/signature.cjs');
require('../onchain/typed-did/did-method-key/did-method-key-signature.cjs');
require('../../signatures/signature-value.cjs');
require('../../signatures/signature-ed25519-value.cjs');
require('../../signatures/signature-secp256k1-value.cjs');
require('../../signatures/signature.cjs');
require('../../signatures/signature-sr25519-value.cjs');
require('../onchain/typed-did/dock-did-value.cjs');
require('../../generic/utils.cjs');
require('../../generic/typed-bytes-array.cjs');
require('../../offchain-signatures/params/index.cjs');
require('../../offchain-signatures/params/value.cjs');
require('../../offchain-signatures/curve-type.cjs');
require('../../offchain-signatures/params/id.cjs');
require('../../generic/with-from-dock-id.cjs');
require('../../offchain-signatures/public-keys/index.cjs');
require('../../generic/with-prop.cjs');
require('../../generic/with-props.cjs');
require('../../../vc/crypto/Bls12381BBDT16KeyPairDock2024.cjs');
require('@docknetwork/crypto-wasm-ts');
require('../../../vc/crypto/common/DockCryptoKeyPair.cjs');
require('../../../vc/crypto/Bls12381BBDT16MACDock2024.cjs');
require('@docknetwork/crypto-wasm-ts/lib/index.js');
require('../../../vc/crypto/common/DockCryptoSignature.cjs');
require('jsonld-signatures');
require('json-stringify-deterministic');
require('semver/preload.js');
require('../../../vc/crypto/common/CustomLinkedDataSignature.cjs');
require('base64url');
require('jsonld');
require('../../../vc/jws.cjs');
require('../../../vc/crypto/Bls12381BBDT16MACProofDock2024.cjs');
require('../../../vc/crypto/common/DockCryptoSignatureProof.cjs');
require('../../../vc/crypto/Bls12381BBSKeyPairDock2023.cjs');
require('../../../vc/crypto/Bls12381BBSSignatureDock2022.cjs');
require('../../../vc/crypto/Bls12381G2KeyPairDock2022.cjs');
require('../../../vc/crypto/Bls12381BBSSignatureDock2023.cjs');
require('../../../vc/crypto/Bls12381BBSSignatureProofDock2022.cjs');
require('../../../vc/crypto/Bls12381BBSSignatureProofDock2023.cjs');
require('../../../vc/crypto/Bls12381BDDT16KeyPairDock2024.cjs');
require('../../../vc/crypto/Bls12381BDDT16MACDock2024.cjs');
require('../../../vc/crypto/Bls12381BDDT16MACProofDock2024.cjs');
require('../../../vc/crypto/Bls12381PSKeyPairDock2023.cjs');
require('../../../vc/crypto/Bls12381PSSignatureDock2023.cjs');
require('../../../vc/crypto/Bls12381PSSignatureProofDock2023.cjs');
require('@juanelas/base64');
require('../../../keypairs/keypair-secp256k1.cjs');
require('elliptic');
require('../../../keypairs/dock-keypair.cjs');
require('@stablelib/ed25519');
require('@transmute/json-web-signature');
require('../../offchain-signatures/public-keys/value.cjs');
require('../../offchain-signatures/public-keys/ref.cjs');
require('../../offchain-signatures/public-keys/id.cjs');
require('../onchain/verification-method-signature.cjs');
require('../../../keypairs/did-keypair.cjs');
require('./verification-method-ref-or-ident-ref.cjs');
require('../../../utils/encoding/base-58.cjs');
require('../../generic/with-base58.cjs');
require('../../generic/with-base58btc.cjs');
require('../../generic/with-multibase.cjs');
require('../../../utils/encoding/multibase.cjs');

class Context extends types_generic_typedArray {
  static Class = types_generic_typedString;
}

class ID extends types_did_onchain_typedDid_index.NamespaceDid {}

class CheqdID extends types_did_onchain_typedDid_index.CheqdNamespaceDid {}

class CheqdTestnetID extends types_did_onchain_typedDid_cheqdDid.CheqdTestnetDid {}

class CheqdMainnetID extends types_did_onchain_typedDid_cheqdDid.CheqdMainnetDid {}

class AlsoKnownAs extends types_generic_typedArray {
  static Class = types_did_onchain_typedDid_index.NamespaceDid;
}

class Controllers extends types_generic_typedArray {
  static Class = types_did_onchain_typedDid_index.NamespaceDid;
}

class CheqdControllers extends types_generic_typedArray {
  static Class = types_did_onchain_typedDid_index.CheqdNamespaceDid;
}

class CheqdTestnetControllers extends types_generic_typedArray {
  static Class = types_did_onchain_typedDid_cheqdDid.CheqdTestnetDid;
}

class CheqdMainnetControllers extends types_generic_typedArray {
  static Class = types_did_onchain_typedDid_cheqdDid.CheqdMainnetDid;
}

class VerificationMethods extends types_generic_typedArray {
  static Class = types_did_document_verificationMethod.VerificationMethod;
}

class CheqdVerificationMethods extends types_generic_typedArray {
  static Class = types_did_document_verificationMethod.CheqdVerificationMethod;
}

class CheqdTestnetVerificationMethods extends types_generic_typedArray {
  static Class = types_did_document_verificationMethod.CheqdTestnetVerificationMethod;
}

class CheqdMainnetVerificationMethods extends types_generic_typedArray {
  static Class = types_did_document_verificationMethod.CheqdMainnetVerificationMethod;
}

class Services extends types_generic_typedArray {
  static Class = class ServiceOrDIDCommService {
    static from(value) {
      if (value instanceof types_did_document_serviceEndpoint.Service || value instanceof types_did_document_serviceEndpoint.DIDCommService) {
        return value;
      }

      if (value.type === 'DIDCommMessaging') {
        const se = types_did_document_serviceEndpoint.createServiceEndpoint(value.type, value.serviceEndpoint);
        return types_did_document_serviceEndpoint.Service.fromServiceEndpoint(value.id, se);
      }

      return types_did_document_serviceEndpoint.Service.from(value);
    }
  };
}

class CheqdServices extends types_generic_typedArray {
  static Class = types_did_document_serviceEndpoint.CheqdService;
}

class CheqdTestnetServices extends CheqdServices {
  static Class = types_did_document_serviceEndpoint.CheqdTestnetService;
}

class CheqdMainnetServices extends CheqdServices {
  static Class = types_did_document_serviceEndpoint.CheqdMainnetService;
}

class VerificationMethodReferences extends types_generic_typedArray {
  static Class = types_did_document_verificationMethodRef.VerificationMethodRef;
}

class CheqdVerificationMethodReferences extends types_generic_typedArray {
  static Class = types_did_document_verificationMethodRef.CheqdVerificationMethodRef;
}

class CheqdTestnetVerificationMethodReferences extends types_generic_typedArray {
  static Class = types_did_document_verificationMethodRef.CheqdTestnetVerificationMethodRef;
}

class CheqdMainnetVerificationMethodReferences extends types_generic_typedArray {
  static Class = types_did_document_verificationMethodRef.CheqdMainnetVerificationMethodRef;
}

class VersionId extends types_generic_typedUuid {}

class CheqdAssertionMethod extends types_generic_typedArray {
  static Class = types_did_document_verificationMethodRefOrCheqdVerificationMethod.CheqdVerificationMethodRefOrCheqdVerificationMethod;
}

class CheqdTestnetAssertionMethod extends types_generic_typedArray {
  static Class = types_did_document_verificationMethodRefOrCheqdVerificationMethod.CheqdTestnetVerificationMethodOrCheqdTestnetVerificationMethodRef;
}

class CheqdMainnetAssertionMethod extends types_generic_typedArray {
  static Class = types_did_document_verificationMethodRefOrCheqdVerificationMethod.CheqdMainnetVerificationMethodOrCheqdMainnetVerificationMethodRef;
}

class DIDDocument extends types_generic_withFrom(
  types_generic_typedStruct,
  (value, from) => from(value instanceof CheqdDIDDocument ? value.toDIDDocument() : value), // eslint-disable-line no-use-before-define
) {
  static Classes = {
    '@context': Context,
    id: ID,
    alsoKnownAs: types_generic_option(AlsoKnownAs),
    controller: Controllers,
    verificationMethod: VerificationMethods,
    service: types_generic_option(Services),
    authentication: types_generic_option(VerificationMethodReferences),
    assertionMethod: types_generic_option(VerificationMethodReferences),
    keyAgreement: types_generic_option(VerificationMethodReferences),
    capabilityInvocation: types_generic_option(VerificationMethodReferences),
    capabilityDelegation: types_generic_option(VerificationMethodReferences),
    [types_did_document_const.ATTESTS_IRI]: types_generic_option(types_generic_typedString),
  };

  static create(
    did,
    keys = [],
    controllers = [],
    serviceEndpoints = {},
    {
      context = [types_did_document_const.CONTEXT_URI],
      alsoKnownAs = [],
      capabilityDelegation = [],
      attests = null,
    } = {},
  ) {
    const doc = new this(
      context,
      did,
      alsoKnownAs,
      controllers,
      [],
      [],
      [],
      [],
      [],
      [],
      capabilityDelegation,
      attests,
    );

    let keyIdx = 0;
    const keysWithRefs = Array.isArray(keys)
      ? keys.map((key) => [[did, ++keyIdx], key])
      : Object.entries(keys);

    for (const [keyRef, didKey] of keysWithRefs) {
      doc.addKey(keyRef, didKey);
    }
    if (serviceEndpoints) {
      for (const [id, serviceEndpoint] of Object.entries(serviceEndpoints)) {
        doc.addServiceEndpoint([did, id], serviceEndpoint);
      }
    }

    return doc;
  }

  addKey(keyRef, didKey) {
    const ref = types_did_document_verificationMethodRef.VerificationMethodRef.from(keyRef);
    const key = types_did_onchain_didKey.DidKey.from(didKey);

    if (this.verificationMethod.find((existing) => existing.id.eq(ref))) {
      throw new Error(`Verification method \`${ref}\` already exists`);
    }

    if (key.verRels.isAuthentication()) {
      this.authentication ||= [];
      this.authentication.push(ref);
    }
    if (key.verRels.isAssertion()) {
      this.assertionMethod ||= [];
      this.assertionMethod.push(ref);
    }
    if (key.verRels.isKeyAgreement()) {
      this.keyAgreement ||= [];
      this.keyAgreement.push(ref);
    }
    if (key.verRels.isCapabilityInvocation()) {
      this.capabilityInvocation ||= [];
      this.capabilityInvocation.push(ref);
    }

    this.verificationMethod.push(types_did_document_verificationMethod.VerificationMethod.fromDidKey(ref, key));

    return this;
  }

  addController(controller) {
    if (this.controller.some((ctrl) => ctrl.eq(controller))) {
      throw new Error(`Controller \`${controller}\` already exists`);
    }
    this.controller.push(controller);

    return this;
  }

  addServiceEndpoint(id, serviceEndpoint) {
    if (this.service.some((service) => service.id.eq(id))) {
      throw new Error(`Service endpoint with id \`${id}\` already exists`);
    }
    this.service.push(types_did_document_serviceEndpoint.Service.fromServiceEndpoint(id, serviceEndpoint));

    return this;
  }

  removeKey(keyRef) {
    const ref = types_did_document_verificationMethodRef.VerificationMethodRef.from(keyRef);
    const keyIndex = this.verificationMethod.findIndex((method) => method.id.eq(ref));

    // eslint-disable-next-line no-bitwise
    if (~keyIndex) {
      this.verificationMethod.splice(keyIndex, 1);
    } else {
      throw new Error(`Verification method with id \`${ref}\` doesn't exist`);
    }

    const isNotRef = (value) => !(value.ref ?? value).eq(ref);

    this.assertionMethod = this.assertionMethod?.filter(isNotRef);
    this.authentication = this.authentication?.filter(isNotRef);
    this.keyAgreement = this.keyAgreement?.filter(isNotRef);
    this.capabilityInvocation = this.capabilityInvocation?.filter(isNotRef);
    this.capabilityDelegation = this.capabilityDelegation?.filter(isNotRef);

    return this;
  }

  removeController(controller) {
    const idx = this.controller.findIndex((ctrl) => ctrl.eq(controller));
    // eslint-disable-next-line
    if (!~idx) {
      throw new Error(`Controller \`${controller}\` doesn't exist`);
    }
    this.controller.splice(idx, 1);

    return this;
  }

  removeServiceEndpoint(id) {
    const idx = this.service.findIndex((service) => service.id.eq(id));
    // eslint-disable-next-line
    if (!~idx) {
      throw new Error(`Service endpoint \`${id}\` doesnt exist`);
    }
    this.service.splice(idx, 1);

    return this;
  }

  nextKeyIndex() {
    return types_generic_typedNumber.from(
      [...this.verificationMethod].reduce(
        (max, { id: { index } }) => Math.max(max, index ?? 0),
        0,
      ),
    ).inc();
  }

  get attests() {
    return this[types_did_document_const.ATTESTS_IRI];
  }

  get publicKey() {
    return this.verificationMethod;
  }

  set attests(iri) {
    this[types_did_document_const.ATTESTS_IRI] = iri;
  }

  setAttests(iri) {
    this.attests = iri;

    return this;
  }

  didKeys() {
    const {
      verificationMethod,
      authentication,
      assertionMethod,
      keyAgreement,
      capabilityInvocation,
    } = this;

    class VerMethodRefSet extends types_generic_typedSet {
      static Class = types_did_document_verificationMethodRef.VerificationMethodRef;
    }

    const auth = new VerMethodRefSet(authentication);
    const assertion = new VerMethodRefSet(assertionMethod);
    const keyAgr = new VerMethodRefSet(keyAgreement);
    const capInv = new VerMethodRefSet(capabilityInvocation);

    const keys = [...verificationMethod].map((method) => {
      const verRels = new types_did_onchain_verificationRelationship.VerificationRelationship();

      if (auth.has(method.id)) {
        verRels.setAuthentication();
      }
      if (assertion.has(method.id)) {
        verRels.setAssertion();
      }
      if (keyAgr.has(method.id)) {
        verRels.setKeyAgreement();
      }
      if (capInv.has(method.id)) {
        verRels.setCapabilityInvocation();
      }

      return [method.id, new types_did_onchain_didKey.DidKey(method.publicKey(), verRels)];
    });

    return new types_did_onchain_didKey.DidKeys(keys);
  }

  // eslint-disable-next-line no-use-before-define
  toCheqd(Class = CheqdDIDDocument, versionId = types_generic_typedUuid.random()) {
    const {
      '@context': context,
      id,
      alsoKnownAs,
      controller,
      verificationMethod,
      authentication,
      assertionMethod,
      capabilityInvocation,
      capabilityDelegation,
      keyAgreement,
      service,
    } = this;

    // eslint-disable-next-line no-use-before-define
    return new (utils_inheritance.ensureEqualToOrPrototypeOf(CheqdDIDDocument, Class))(
      context,
      id,
      alsoKnownAs,
      controller,
      verificationMethod,
      service,
      authentication,
      assertionMethod,
      keyAgreement,
      capabilityInvocation,
      capabilityDelegation,
      versionId,
    );
  }
}

class CheqdDIDDocument extends types_generic_typedStruct {
  static Classes = {
    context: Context,
    id: CheqdID,
    alsoKnownAs: types_generic_option(AlsoKnownAs),
    controller: CheqdControllers,
    verificationMethod: CheqdVerificationMethods,
    service: types_generic_option(CheqdServices),
    authentication: CheqdVerificationMethodReferences,
    assertionMethod: types_generic_option(CheqdAssertionMethod),
    keyAgreement: types_generic_option(CheqdVerificationMethodReferences),
    capabilityInvocation: types_generic_option(CheqdVerificationMethodReferences),
    capabilityDelegation: types_generic_option(CheqdVerificationMethodReferences),
    versionId: types_generic_option(VersionId),
  };

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

    const { verificationMethod } = this;

    this.verificationMethod = verificationMethod.filter(
      (verMethod) => !verMethod.isOffchain()
        && !verMethod.verificationMaterial.bytes.every((item) => !item),
    );
    const offchainVerMethod = verificationMethod.filter((verMethod) => verMethod.isOffchain());

    this.assertionMethod = [
      ...(this.assertionMethod ? this.assertionMethod.filter(
        (ref) => !offchainVerMethod.some((verMethod) => verMethod.id.eq(ref)),
      ) : []),
      ...offchainVerMethod,
    ];
  }

  toDIDDocument() {
    const {
      context,
      id,
      alsoKnownAs,
      controller,
      verificationMethod,
      authentication,
      assertionMethod,
      capabilityInvocation,
      capabilityDelegation,
      keyAgreement,
      service,
    } = this;

    // Convert CheqdService objects to Service objects
    const convertedServices = [...service].map((cheqdService) => {
      // Create a ServiceEndpoint object from the CheqdService data
      const serviceEndpointArray = cheqdService.serviceEndpoint.toJSON();
      const serviceEndpoint = types_did_document_serviceEndpoint.createServiceEndpoint(cheqdService.serviceType, serviceEndpointArray);
      // Convert the Cheqd-specific ID to a generic ID
      const genericId = types_did_document_serviceEndpoint.ServiceEndpointId.from(cheqdService.id.toJSON());
      return types_did_document_serviceEndpoint.Service.fromServiceEndpoint(genericId, serviceEndpoint);
    });

    const assertionMethodOffchainKeys = [...assertionMethod].filter(
      (keyRefOrKey) => keyRefOrKey.id,
    );
    const verificationMethodWithOffchainKeys = [
      ...verificationMethod,
      ...assertionMethodOffchainKeys,
    ];
    const assertionMethodOnlyRefs = [...assertionMethod].map(
      (keyRefOrKey) => keyRefOrKey.id ?? keyRefOrKey,
    );

    return new DIDDocument(
      context,
      id,
      alsoKnownAs,
      controller,
      verificationMethodWithOffchainKeys,
      convertedServices,
      authentication,
      assertionMethodOnlyRefs,
      keyAgreement,
      capabilityInvocation,
      capabilityDelegation,
      null,
    );
  }
}

class CheqdTestnetDIDDocument extends CheqdDIDDocument {
  static Classes = {
    context: Context,
    id: CheqdTestnetID,
    alsoKnownAs: types_generic_option(AlsoKnownAs),
    controller: CheqdTestnetControllers,
    verificationMethod: CheqdTestnetVerificationMethods,
    service: types_generic_option(CheqdTestnetServices),
    authentication: CheqdTestnetVerificationMethodReferences,
    assertionMethod: types_generic_option(CheqdTestnetAssertionMethod),
    keyAgreement: types_generic_option(CheqdTestnetVerificationMethodReferences),
    capabilityInvocation: types_generic_option(CheqdTestnetVerificationMethodReferences),
    capabilityDelegation: types_generic_option(CheqdTestnetVerificationMethodReferences),
    versionId: types_generic_option(VersionId),
  };
}

class CheqdMainnetDIDDocument extends CheqdDIDDocument {
  static Classes = {
    context: Context,
    id: CheqdMainnetID,
    alsoKnownAs: types_generic_option(AlsoKnownAs),
    controller: CheqdMainnetControllers,
    verificationMethod: CheqdMainnetVerificationMethods,
    service: types_generic_option(CheqdMainnetServices),
    authentication: CheqdMainnetVerificationMethodReferences,
    assertionMethod: types_generic_option(CheqdMainnetAssertionMethod),
    keyAgreement: types_generic_option(CheqdMainnetVerificationMethodReferences),
    capabilityInvocation: types_generic_option(CheqdMainnetVerificationMethodReferences),
    capabilityDelegation: types_generic_option(CheqdMainnetVerificationMethodReferences),
    versionId: types_generic_option(VersionId),
  };
}

exports.CheqdMainnetService = types_did_document_serviceEndpoint.CheqdMainnetService;
exports.CheqdMainnetServiceEndpointId = types_did_document_serviceEndpoint.CheqdMainnetServiceEndpointId;
exports.CheqdService = types_did_document_serviceEndpoint.CheqdService;
exports.CheqdServiceEndpointId = types_did_document_serviceEndpoint.CheqdServiceEndpointId;
exports.CheqdTestnetService = types_did_document_serviceEndpoint.CheqdTestnetService;
exports.CheqdTestnetServiceEndpointId = types_did_document_serviceEndpoint.CheqdTestnetServiceEndpointId;
exports.DIDCommMessaging = types_did_document_serviceEndpoint.DIDCommMessaging;
exports.DIDCommService = types_did_document_serviceEndpoint.DIDCommService;
exports.DIDCommServiceEndpoint = types_did_document_serviceEndpoint.DIDCommServiceEndpoint;
exports.DIDCommServiceEndpointValue = types_did_document_serviceEndpoint.DIDCommServiceEndpointValue;
exports.DIDCommServiceEndpoints = types_did_document_serviceEndpoint.DIDCommServiceEndpoints;
exports.DIDCommServiceEndpointsArray = types_did_document_serviceEndpoint.DIDCommServiceEndpointsArray;
exports.LinkedDomains = types_did_document_serviceEndpoint.LinkedDomains;
exports.Service = types_did_document_serviceEndpoint.Service;
exports.ServiceEndpoint = types_did_document_serviceEndpoint.ServiceEndpoint;
exports.ServiceEndpointId = types_did_document_serviceEndpoint.ServiceEndpointId;
exports.ServiceEndpointOrigin = types_did_document_serviceEndpoint.ServiceEndpointOrigin;
exports.ServiceEndpointOrigins = types_did_document_serviceEndpoint.ServiceEndpointOrigins;
exports.ServiceEndpointType = types_did_document_serviceEndpoint.ServiceEndpointType;
exports.ServiceEndpointValue = types_did_document_serviceEndpoint.ServiceEndpointValue;
exports.ServiceEndpoints = types_did_document_serviceEndpoint.ServiceEndpoints;
exports.ServiceEndpointsType = types_did_document_serviceEndpoint.ServiceEndpointsType;
exports.SuffixServiceEndpointId = types_did_document_serviceEndpoint.SuffixServiceEndpointId;
exports.UnknownServiceEndpoint = types_did_document_serviceEndpoint.UnknownServiceEndpoint;
exports.createServiceEndpoint = types_did_document_serviceEndpoint.createServiceEndpoint;
exports.CheqdMainnetPublicKeyMetadata = types_did_document_verificationMethod.CheqdMainnetPublicKeyMetadata;
exports.CheqdMainnetVerificationMethod = types_did_document_verificationMethod.CheqdMainnetVerificationMethod;
exports.CheqdMainnetVerificationMethodAssertion = types_did_document_verificationMethod.CheqdMainnetVerificationMethodAssertion;
exports.CheqdMainnetVerificationMethodAssertionLegacy = types_did_document_verificationMethod.CheqdMainnetVerificationMethodAssertionLegacy;
exports.CheqdPublicKeyMetadata = types_did_document_verificationMethod.CheqdPublicKeyMetadata;
exports.CheqdTestnetPublicKeyMetadata = types_did_document_verificationMethod.CheqdTestnetPublicKeyMetadata;
exports.CheqdTestnetVerificationMethod = types_did_document_verificationMethod.CheqdTestnetVerificationMethod;
exports.CheqdTestnetVerificationMethodAssertion = types_did_document_verificationMethod.CheqdTestnetVerificationMethodAssertion;
exports.CheqdTestnetVerificationMethodAssertionLegacy = types_did_document_verificationMethod.CheqdTestnetVerificationMethodAssertionLegacy;
exports.CheqdVerificationMethod = types_did_document_verificationMethod.CheqdVerificationMethod;
exports.CheqdVerificationMethodAssertion = types_did_document_verificationMethod.CheqdVerificationMethodAssertion;
exports.CheqdVerificationMethodAssertionLegacy = types_did_document_verificationMethod.CheqdVerificationMethodAssertionLegacy;
exports.DockPublicKeyMetadata = types_did_document_verificationMethod.DockPublicKeyMetadata;
exports.PublicKeyBase58 = types_did_document_verificationMethod.PublicKeyBase58;
exports.PublicKeyBase58OrMultibase = types_did_document_verificationMethod.PublicKeyBase58OrMultibase;
exports.PublicKeyBase64 = types_did_document_verificationMethod.PublicKeyBase64;
exports.PublicKeyMetadata = types_did_document_verificationMethod.PublicKeyMetadata;
exports.PublicKeyMultibase = types_did_document_verificationMethod.PublicKeyMultibase;
exports.TypedJsonWebKey = types_did_document_verificationMethod.TypedJsonWebKey;
exports.VerificationMethod = types_did_document_verificationMethod.VerificationMethod;
exports.VerificationMethodRef = types_did_document_verificationMethodRef.VerificationMethodRef;
exports.ATTESTS_IRI = types_did_document_const.ATTESTS_IRI;
exports.CONTEXT_URI = types_did_document_const.CONTEXT_URI;
exports.Bls12381BBDT16VerificationKeyDock2024 = types_did_document_verificationMethodType.Bls12381BBDT16VerificationKeyDock2024;
exports.Bls12381BBSVerificationKeyDock2023 = types_did_document_verificationMethodType.Bls12381BBSVerificationKeyDock2023;
exports.Bls12381G2VerificationKeyDock2022 = types_did_document_verificationMethodType.Bls12381G2VerificationKeyDock2022;
exports.Bls12381PSVerificationKeyDock2023 = types_did_document_verificationMethodType.Bls12381PSVerificationKeyDock2023;
exports.EcdsaSecp256k1VerificationKey2019 = types_did_document_verificationMethodType.EcdsaSecp256k1VerificationKey2019;
exports.Ed25519Verification2018Method = types_did_document_verificationMethodType.Ed25519Verification2018Method;
exports.Ed25519Verification2020Method = types_did_document_verificationMethodType.Ed25519Verification2020Method;
exports.JsonWebKey2020Method = types_did_document_verificationMethodType.JsonWebKey2020Method;
exports.Sr25519Verification2020Method = types_did_document_verificationMethodType.Sr25519Verification2020Method;
exports.VerificationMethodType = types_did_document_verificationMethodType.VerificationMethodType;
exports.X25519KeyAgreementKey2019 = types_did_document_verificationMethodType.X25519KeyAgreementKey2019;
exports.IdentRef = types_did_document_identRef;
exports.CheqdDIDDocument = CheqdDIDDocument;
exports.CheqdMainnetDIDDocument = CheqdMainnetDIDDocument;
exports.CheqdMainnetVerificationMethodReferences = CheqdMainnetVerificationMethodReferences;
exports.CheqdTestnetDIDDocument = CheqdTestnetDIDDocument;
exports.CheqdTestnetVerificationMethodReferences = CheqdTestnetVerificationMethodReferences;
exports.CheqdVerificationMethodReferences = CheqdVerificationMethodReferences;
exports.DIDDocument = DIDDocument;
exports.Services = Services;
exports.VerificationMethodReferences = VerificationMethodReferences;
exports.VersionId = VersionId;
//# sourceMappingURL=index.cjs.map
