import '../did/index.js';
import '../generic/typed-enum.js';
import '../generic/typed-bytes.js';
import TypedString from '../generic/typed-string.js';
import TypedArray from '../generic/typed-array.js';
import '../generic/typed-tuple.js';
import '../generic/typed-null.js';
import '../../utils/types/array.js';
import 'crypto';
import 'bs58';
import 'multiformats/bases/base58';
import 'varint';
import '../../utils/encoding/ss-58.js';
import '../generic/typed-number.js';
import '../generic/typed-set.js';
import '../generic/typed-map.js';
import TypedStruct from '../generic/typed-struct.js';
import TypedBytesArray from '../generic/typed-bytes-array.js';
import TypedUUID from '../generic/typed-uuid.js';
import { VerificationMethodSignature } from '../did/onchain/verification-method-signature.js';
import { CheqdDIDDocument } from '../did/document/index.js';
import { CheqdDid } from '../did/onchain/typed-did/cheqd-did.js';
import 'uuid';
import 'js-sha256';
import '../did/offchain/index.js';
import '../generic/sized.js';
import '../../utils/types/number.js';
import '../../utils/inheritance.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 '../did/offchain/doc-ref.js';
import '../did/onchain/index.js';
import '../did/onchain/constants.js';
import '../did/onchain/typed-did/index.js';
import '../did/onchain/typed-did/did-method-key/did-method-key-public-key.js';
import '../../utils/encoding/base-58-btc.js';
import '../generic/with-qualifier.js';
import '../generic/with-from.js';
import '../generic/with-base.js';
import '../generic/with-catch-null.js';
import '../generic/with-eq.js';
import '../generic/any-of.js';
import '../generic/with-from-json-bytes.js';
import '../public-keys/public-key.js';
import '../public-keys/public-key-x25519-value.js';
import '../generic/create-placeholder.js';
import '../public-keys/public-key-ed25519-value.js';
import '../../vc/crypto/constants.js';
import '../public-keys/public-key-secp256k1-value.js';
import '../public-keys/public-key-sr25519-value.js';
import '../did/onchain/typed-did/signature.js';
import '../did/onchain/typed-did/did-method-key/did-method-key-signature.js';
import '../signatures/signature-value.js';
import '../signatures/signature-ed25519-value.js';
import '../signatures/signature-secp256k1-value.js';
import '../signatures/signature.js';
import '../signatures/signature-sr25519-value.js';
import '../did/onchain/typed-did/dock-did-value.js';
import '../generic/utils.js';
import '../did/onchain/controllers.js';
import '../did/onchain/verification-relationship.js';
import '../did/onchain/did-key.js';
import '../offchain-signatures/params/index.js';
import '../offchain-signatures/params/value.js';
import '../generic/option.js';
import '../offchain-signatures/curve-type.js';
import '../offchain-signatures/params/id.js';
import '../generic/with-from-dock-id.js';
import '../offchain-signatures/public-keys/index.js';
import '../generic/with-prop.js';
import '../generic/with-props.js';
import '../../vc/crypto/Bls12381BBDT16KeyPairDock2024.js';
import '@docknetwork/crypto-wasm-ts';
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 '../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 '../offchain-signatures/public-keys/value.js';
import '../offchain-signatures/public-keys/ref.js';
import '../offchain-signatures/public-keys/id.js';
import '../did/document/ident-ref.js';
import '../did/document/const.js';
import '../did/document/verification-method-type.js';
import '../did/document/verification-method.js';
import '../../utils/encoding/base-58.js';
import '../generic/with-base58.js';
import '../generic/with-base58btc.js';
import '../generic/with-multibase.js';
import '../../utils/encoding/multibase.js';
import '../did/document/service-endpoint.js';
import '../did/document/verification-method-ref-or-cheqd-verification-method.js';
import '../../keypairs/did-keypair.js';
import '../did/document/verification-method-ref-or-ident-ref.js';

const createTypes = (Payload) => {
  const payloadWithSigsName = `CheqdPayloadWithSignatures(${Payload.name})`;
  const payloadWithTypeUrlAndSigsName = `CheqdPayloadWithTypeUrlAndSignatures(${Payload.name})`;

  const obj1 = {
    [payloadWithSigsName]: class extends TypedStruct {
      static Classes = {
        payload: Payload,
        signatures: class Signatures extends TypedArray {
          static Class = VerificationMethodSignature;
        },
      };
    },
  };
  const obj2 = {
    [payloadWithTypeUrlAndSigsName]: class extends TypedStruct {
      static Classes = {
        typeUrl: class TypeURL extends TypedString {},
        value: obj1[payloadWithSigsName],
      };
    },
  };

  // eslint-disable-next-line
  Payload.ResourcePayloadWithTypeUrlAndSignatures = obj2[payloadWithTypeUrlAndSigsName];

  return [
    obj1[payloadWithSigsName],
    obj2[payloadWithTypeUrlAndSigsName],
  ];
};

class CheqdCreateResource extends TypedStruct {
  static Classes = {
    collectionId: class CollectionID extends TypedUUID {},
    id: class ResourceId extends TypedUUID {},
    version: class Version extends TypedString {},
    alsoKnownAs: class AlsoKnownAs extends TypedArray {
      static Class = CheqdDid;
    },
    name: class Name extends TypedString {},
    resourceType: class ResourceType extends TypedString {},
    data: class Data extends TypedBytesArray {},
  };
}

class CheqdDeactivateDidDocument extends TypedStruct {
  static Classes = {
    id: CheqdDid,
    versionId: TypedUUID,
  };
}

const [
  CheqdCreateResourcePayloadWithSignatures,
  CheqdCreateResourcePayloadWithTypeUrlAndSignatures,
] = createTypes(CheqdCreateResource);

const [
  CheqdSetDidDocumentPayloadWithSignatures,
  CheqdSetDidDocumentPayloadWithTypeUrlAndSignatures,
] = createTypes(CheqdDIDDocument);

const [
  CheqdCheqdDeactivateDidDocumentPayloadWithSignatures,
  CheqdCheqdDeactivateDidDocumentPayloadWithTypeUrlAndSignatures,
] = createTypes(CheqdDeactivateDidDocument);

export { CheqdCheqdDeactivateDidDocumentPayloadWithSignatures, CheqdCheqdDeactivateDidDocumentPayloadWithTypeUrlAndSignatures, CheqdCreateResource, CheqdCreateResourcePayloadWithSignatures, CheqdCreateResourcePayloadWithTypeUrlAndSignatures, CheqdDeactivateDidDocument, CheqdSetDidDocumentPayloadWithSignatures, CheqdSetDidDocumentPayloadWithTypeUrlAndSignatures };
//# sourceMappingURL=cheqd.js.map
