import { KBUniversalAccumulatorValue } from '@docknetwork/crypto-wasm-ts';
import { normalizeToHex, normalizeToU8a } from '../../../utils/types/bytes.js';
import '../common/abstract-api-provider.js';
import AbstractBaseModule from '../common/abstract-base-module.js';
import withAbstractParams from '../common/with-abstract-params.js';
import withAbstractPublicKeys from '../common/with-abstract-public-keys.js';
import '../../../types/blob/index.js';
import '../../../types/attest/index.js';
import '../../../types/did/index.js';
import '../../../types/generic/typed-enum.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-null.js';
import '../../../utils/types/array.js';
import { withExtendedPrototypeProperties } from '../../../utils/inheritance.js';
import 'bs58';
import 'multiformats/bases/base58';
import 'varint';
import '../../../utils/encoding/ss-58.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/offchain-signatures/params/index.js';
import '../../../types/offchain-signatures/public-keys/index.js';
import '../../../types/offchain-signatures/curve-type.js';
import '../../../types/payload/cheqd.js';
import '../../../types/policy/index.js';
import '../../../types/public-keys/public-key.js';
import '../../../types/public-keys/public-key-sr25519-value.js';
import '../../../types/public-keys/public-key-ed25519-value.js';
import '../../../types/public-keys/public-key-secp256k1-value.js';
import '../../../types/public-keys/public-key-x25519-value.js';
import '../../../types/signatures/signature-value.js';
import '../../../types/signatures/signature.js';
import '../../../types/status-list-credential/index.js';
import '../../../types/anchor/index.js';
import '../../../types/accumulator/keys.js';
import { AccumulatorParams } from '../../../types/accumulator/params.js';
import { AccumulatorPublicKey } from '../../../types/accumulator/public-key.js';
import { PositiveAccumulator, AccumulatorCommon, UniversalAccumulator, KBUniversalAccumulator } from '../../../types/accumulator/accumulator.js';
import '../../../types/accumulator/id.js';
import '../../../types/trust-registry/id.js';
import 'crypto';
import '../../../utils/interfaces.js';
import '../../../utils/assert.js';
import '../../../utils/error.js';
import '../../../utils/types/string.js';
import '../../../utils/types/iterable.js';
import '../../../utils/types/object.js';
import '../../../utils/types/set.js';
import '../../../types/generic/with-prop.js';
import '../../../types/generic/with-props.js';
import 'blake2b';
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/create-placeholder.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/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-ed25519-value.js';
import '../../../vc/crypto/constants.js';
import '../../../types/signatures/signature-secp256k1-value.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 '../../../utils/mappings/dock-did-by-id.js';
import '../../../types/blob/blob.js';
import '../../../types/generic/option.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 '../../../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/params/id.js';
import '../../../types/offchain-signatures/params/value.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 '../../../types/policy/one-of-policy-value.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/accumulator/variants.js';

/* eslint-disable camelcase */


const AccumulatorType = {
  VBPos: 0,
  VBUni: 1,
  KBUni: 2,
};

/** Class to manage accumulators on chain */
class AbstractAccumulatorModule extends withAbstractParams(
  withAbstractPublicKeys(AbstractBaseModule),
) {
  static Params = AccumulatorParams;

  static PublicKey = AccumulatorPublicKey;

  /**
   * Return the accumulated value as hex
   * @param accumulated {Uint8Array|KBUniversalAccumulatorValue}
   * @param typ {number} - Type of the accumulator
   * @returns {string}
   */
  static accumulatedAsHex(accumulated, typ = AccumulatorType.VBPos) {
    if (typ === AccumulatorType.VBPos || typ === AccumulatorType.VBUni) {
      return normalizeToHex(accumulated);
    } else if (typ === AccumulatorType.KBUni) {
      return normalizeToHex(accumulated.toBytes());
    } else {
      throw new Error(`Unknown accumulator type ${typ}`);
    }
  }

  /**
   * Parse the given accumulated value in hex form
   * @param accumulated {string}
   * @param typ {number} - Type of the accumulator
   * @returns {Uint8Array|KBUniversalAccumulatorValue}
   */
  static accumulatedFromHex(accumulated, typ = AccumulatorType.VBPos) {
    if (typ === AccumulatorType.VBPos || typ === AccumulatorType.VBUni) {
      return normalizeToU8a(accumulated);
    } else if (typ === AccumulatorType.KBUni) {
      return KBUniversalAccumulatorValue.fromBytes(normalizeToU8a(accumulated));
    } else {
      throw new Error(`Unknown accumulator type ${typ}`);
    }
  }

  /**
   * Creates and stores a new accumulator on the blockchain
   *
   * An accumulator is a cryptographic data structure used to maintain an aggregate value that can be updated incrementally.
   * This method creates a new accumulator instance with the given ID and initial state.
   *
   * @param {string} id - Unique identifier for the accumulator
   * @param {Accumulator} accumulator - Initial accumulator value to store
   * @param {DidKeypair} didKeypair - Keypair used to sign the transaction
   * @returns {Promise<*>} Promise resolving to the transaction result
   */
  async addAccumulator(id, accumulator, didKeypair, params) {
    return await this.signAndSend(
      await this.addAccumulatorTx(id, accumulator, didKeypair),
      params,
    );
  }

  /**
   * Updates an existing accumulator on the blockchain
   *
   * This method replaces the current state of an accumulator with a new value.
   * The accumulator must already exist (be previously created) to be updated.
   *
   * @param {string} id - Unique identifier of the accumulator to update
   * @param {AccumulatorValue} accumulator - New accumulator value to set
   * @param {DidKeypair} didKeypair - Keypair used to sign the transaction
   * @returns {Promise<*>} Promise resolving to the transaction result
   */
  async updateAccumulator(
    id,
    accumulator,
    { additions, removals, witnessUpdateInfo },
    didKeypair,
    params,
  ) {
    return await this.signAndSend(
      await this.updateAccumulatorTx(
        id,
        accumulator,
        { additions, removals, witnessUpdateInfo },
        didKeypair,
      ),
      params,
    );
  }

  /**
   * Remove the accumulator from chain. This frees up the id for reuse.
   *
   * @param id - id to remove
   * @param didKeypair - Signer's keypair reference
   * @param params - Transaction parameters.
   * @returns {Promise<*>}
   */
  async removeAccumulator(id, didKeypair, params) {
    return await this.signAndSend(
      await this.removeAccumulatorTx(id, didKeypair),
      params,
    );
  }

  /**
   * Add a positive (add-only) accumulator
   * @param id - Unique accumulator id
   * @param accumulated - Current accumulated value.
   * @param publicKeyRef - Reference to accumulator public key. If the reference contains the key id 0, it means the accumulator does not
   * have any public key on the chain. This is useful for KVAC.
   * @param didKeypair - Signer's keypair reference
   * @param params - Transaction parameters.
   * @returns {Promise<*>}
   */
  async addPositiveAccumulator(
    id,
    accumulated,
    publicKeyRef,
    didKeypair,
    params,
  ) {
    return await this.signAndSend(
      await this.addPositiveAccumulatorTx(
        id,
        accumulated,
        publicKeyRef,
        didKeypair,
      ),
      params,
    );
  }

  /**
   * Add universal (supports add/remove) accumulator
   * @param id - Unique accumulator id
   * @param accumulated - Current accumulated value.
   * @param publicKeyRef - Reference to accumulator public key. If the reference contains the key id 0, it means the accumulator does not
   * have any public key on the chain. This is useful for KVAC.
   * @param maxSize - Maximum size of the accumulator
   * @param didKeypair - Signer's keypair reference
   * @param params - Transaction parameters.
   * @returns {Promise<*>}
   */
  async addUniversalAccumulator(
    id,
    accumulated,
    publicKeyRef,
    maxSize,
    didKeypair,
    params,
  ) {
    return await this.signAndSend(
      await this.addUniversalAccumulatorTx(
        id,
        accumulated,
        publicKeyRef,
        maxSize,
        didKeypair,
      ),
      params,
    );
  }

  /**
   * Add KB universal (supports add/remove) accumulator
   * @param id - Unique accumulator id
   * @param accumulated - Current accumulated value.
   * @param publicKeyRef - Reference to accumulator public key. If the reference contains the key id 0, it means the accumulator does not
   * have any public key on the chain. This is useful for KVAC.
   * @param didKeypair - Signer's keypair reference
   * @param params - Transaction parameters.
   * @returns {Promise<*>}
   */
  async addKBUniversalAccumulator(
    id,
    accumulated,
    publicKeyRef,
    didKeypair,
    params,
  ) {
    return await this.signAndSend(
      await this.addKBUniversalAccumulatorTx(
        id,
        accumulated,
        publicKeyRef,
        didKeypair,
      ),
      params,
    );
  }

  /**
   * Update existing positive (add-only) accumulator
   * @param id - Unique accumulator id
   * @param accumulated - Current accumulated value.
   * @param publicKeyRef - Reference to accumulator public key. If the reference contains the key id 0, it means the accumulator does not
   * have any public key on the chain. This is useful for KVAC.
   * @param didKeypair - Signer's keypair reference
   * @param params - Transaction parameters.
   * @returns {Promise<*>}
   */
  async updatePositiveAccumulator(
    id,
    accumulated,
    { additions, removals, witnessUpdateInfo },
    publicKeyRef,
    didKeypair,
    params,
  ) {
    return await this.signAndSend(
      await this.updatePositiveAccumulatorTx(
        id,
        accumulated,
        { additions, removals, witnessUpdateInfo },
        publicKeyRef,
        didKeypair,
      ),
      params,
    );
  }

  /**
   * Update existing universal (supports update/remove) accumulator
   * @param id - Unique accumulator id
   * @param accumulated - Current accumulated value.
   * @param publicKeyRef - Reference to accumulator public key. If the reference contains the key id 0, it means the accumulator does not
   * have any public key on the chain. This is useful for KVAC.
   * @param maxSize - Maximum size of the accumulator
   * @param didKeypair - Signer's keypair reference
   * @param params - Transaction parameters.
   * @returns {Promise<*>}
   */
  async updateUniversalAccumulator(
    id,
    accumulated,
    { additions, removals, witnessUpdateInfo },
    publicKeyRef,
    maxSize,
    didKeypair,
    params,
  ) {
    return await this.signAndSend(
      await this.updateUniversalAccumulatorTx(
        id,
        accumulated,
        { additions, removals, witnessUpdateInfo },
        publicKeyRef,
        maxSize,
        didKeypair,
      ),
      params,
    );
  }

  /**
   * Update existing KB universal (supports update/remove) accumulator
   * @param id - Unique accumulator id
   * @param accumulated - Current accumulated value.
   * @param publicKeyRef - Reference to accumulator public key. If the reference contains the key id 0, it means the accumulator does not
   * have any public key on the chain. This is useful for KVAC.
   * @param didKeypair - Signer's keypair reference
   * @returns {Promise<*>}
   */
  async updateKBUniversalAccumulator(
    id,
    accumulated,
    { additions, removals, witnessUpdateInfo },
    publicKeyRef,
    didKeypair,
    params,
  ) {
    return await this.signAndSend(
      await this.updateKBUniversalAccumulatorTx(
        id,
        accumulated,
        { additions, removals, witnessUpdateInfo },
        publicKeyRef,
        didKeypair,
      ),
      params,
    );
  }

  /**
   * Add a positive (add-only) accumulator
   * @param id - Unique accumulator id
   * @param accumulated - Current accumulated value.
   * @param publicKeyRef - Reference to accumulator public key. If the reference contains the key id 0, it means the accumulator does not
   * have any public key on the chain. This is useful for KVAC.
   * @param didKeypair - Signer's keypair reference
   * @returns {Promise<*>}
   */
  async addPositiveAccumulatorTx(id, accumulated, publicKeyRef, didKeypair) {
    return await this.addAccumulatorTx(
      id,
      new PositiveAccumulator(new AccumulatorCommon(accumulated, publicKeyRef)),
      didKeypair,
    );
  }

  /**
   * Add universal (supports add/remove) accumulator
   * @param id - Unique accumulator id
   * @param accumulated - Current accumulated value.
   * @param publicKeyRef - Reference to accumulator public key. If the reference contains the key id 0, it means the accumulator does not
   * have any public key on the chain. This is useful for KVAC.
   * @param maxSize - Maximum size of the accumulator
   * @param didKeypair - Signer's keypair reference
   * @returns {Promise<*>}
   */
  async addUniversalAccumulatorTx(
    id,
    accumulated,
    publicKeyRef,
    maxSize,
    didKeypair,
  ) {
    return await this.addAccumulatorTx(
      id,
      new UniversalAccumulator(
        new UniversalAccumulator.Class(
          new AccumulatorCommon(accumulated, publicKeyRef),
          maxSize,
        ),
      ),
      didKeypair,
    );
  }

  /**
   * Add KB universal (supports add/remove) accumulator
   * @param id - Unique accumulator id
   * @param accumulated - Current accumulated value.
   * @param publicKeyRef - Reference to accumulator public key. If the reference contains the key id 0, it means the accumulator does not
   * have any public key on the chain. This is useful for KVAC.
   * @param didKeypair - Signer's keypair reference
   * @returns {Promise<*>}
   */
  async addKBUniversalAccumulatorTx(id, accumulated, publicKeyRef, didKeypair) {
    return await this.addAccumulatorTx(
      id,
      new KBUniversalAccumulator(
        new AccumulatorCommon(accumulated, publicKeyRef),
      ),
      didKeypair,
    );
  }

  /**
   * Update a positive (add-only) accumulator
   * @param id - Unique accumulator id
   * @param accumulated - Current accumulated value.
   * @param publicKeyRef - Reference to accumulator public key. If the reference contains the key id 0, it means the accumulator does not
   * have any public key on the chain. This is useful for KVAC.
   * @param didKeypair - Signer's keypair reference
   * @returns {Promise<*>}
   */
  async updatePositiveAccumulatorTx(
    id,
    accumulated,
    { additions, removals, witnessUpdateInfo },
    publicKeyRef,
    didKeypair,
  ) {
    return await this.updateAccumulatorTx(
      id,
      new PositiveAccumulator(new AccumulatorCommon(accumulated, publicKeyRef)),
      {
        additions,
        removals,
        witnessUpdateInfo,
      },
      didKeypair,
    );
  }

  /**
   * Update universal (supports add/remove) accumulator
   * @param id - Unique accumulator id
   * @param accumulated - Current accumulated value.
   * @param publicKeyRef - Reference to accumulator public key. If the reference contains the key id 0, it means the accumulator does not
   * have any public key on the chain. This is useful for KVAC.
   * @param maxSize - Maximum size of the accumulator
   * @param didKeypair - Signer's keypair reference
   * @returns {Promise<*>}
   */
  // eslint-disable-next-line sonarjs/no-identical-functions
  async updateUniversalAccumulatorTx(
    id,
    accumulated,
    { additions, removals, witnessUpdateInfo },
    publicKeyRef,
    maxSize,
    didKeypair,
  ) {
    return await this.updateAccumulatorTx(
      id,
      new UniversalAccumulator(
        new UniversalAccumulator.Class(
          new AccumulatorCommon(accumulated, publicKeyRef),
          maxSize,
        ),
      ),
      {
        additions,
        removals,
        witnessUpdateInfo,
      },
      didKeypair,
    );
  }

  /**
   * Update KB universal (supports add/remove) accumulator
   * @param id - Unique accumulator id
   * @param accumulated - Current accumulated value.
   * @param publicKeyRef - Reference to accumulator public key. If the reference contains the key id 0, it means the accumulator does not
   * have any public key on the chain. This is useful for KVAC.
   * @param didKeypair - Signer's keypair reference
   * @returns {Promise<*>}
   */
  // eslint-disable-next-line sonarjs/no-identical-functions
  async updateKBUniversalAccumulatorTx(
    id,
    accumulated,
    { additions, removals, witnessUpdateInfo },
    publicKeyRef,
    didKeypair,
  ) {
    return await this.updateAccumulatorTx(
      id,
      new KBUniversalAccumulator(
        new AccumulatorCommon(accumulated, publicKeyRef),
      ),
      {
        additions,
        removals,
        witnessUpdateInfo,
      },
      didKeypair,
    );
  }

  /**
   * Add an accumulator to the chain.
   *
   * @param id - Unique accumulator id
   * @param accumulator - Accumulator value.
   * @param signingKeyRef - Signer's keypair reference
   * @returns {Promise<*>}
   */
  async addAccumulatorTx(_id, _accumulator, _didKeypair) {
    throw new Error('Unimplemented');
  }

  /**
   * Update existing accumulator on the chain.
   *
   * @param id - Unique accumulator id
   * @param accumulator - Accumulator value.
   * @param {object} changes
   * @param signingKeyRef - Signer's keypair reference
   * @returns {Promise<*>}
   */
  async updateAccumulatorTx(
    _id,
    _accumulator,
    { additions: _, removals: __, witnessUpdateInfo: ___ },
    _didKeypair,
  ) {
    throw new Error('Unimplemented');
  }

  /**
   * Get the accumulator as an object. The field `type` in object specifies whether it is "positive" or "universal".
   * Fields `created` and `lastModified` are identifiers where the accumulator was created and last updated respectively.
   * Field `accumulated` contains the current accumulated value.
   * @param id
   * @param includeKey - Fetch public key for the given accumulator.
   * @param includeKeyParams - Fetch public key params.
   * @returns {Promise<Accumulator|null>}
   */
  async getAccumulator(_id, _includeKey = false, _includeKeyParams = false) {
    throw new Error('Unimplemented');
  }

  /**
   * Update given witness by downloading necessary accumulators (blocks) and applying the updates if found.
   * **Both `from` and `to` are inclusive.**
   *
   * @param accumulatorId
   * @param member
   * @param witness - this will be updated to the latest witness
   * @param from - identifier to start from (block number or collection item id)
   * @param to - identifier to end in (block number or collection item id)
   * @returns {Promise<void>}
   */
  async updateWitness(_accumulatorId, _member, _witness, _from, _to) {
    throw new Error('Unimplemented');
  }

  /**
   * Retrieves history for the accumulator with supplied identifier.
   *
   * @param {*} _accumulatorId
   * @returns {?{ created: *, updates: Array<*> }}
   */
  async accumulatorHistory(_accumulatorId) {
    throw new Error('Unimplemented');
  }

  /**
   * Retrieves `Array` containing all versions of the accumulator with supplied identifier.
   *
   * @param {*} _accumulatorId
   * @returns {Array<*>}
   */
  async accumulatorVersions(_accumulatorId) {
    throw new Error('Unimplemented');
  }
}

var AbstractAccumulatorModule$1 = withExtendedPrototypeProperties(
  [
    'getAccumulator',
    'addAccumulatorTx',
    'updateAccumulatorTx',
    'removeAccumulatorTx',
    'updateWitness',
  ],
  AbstractAccumulatorModule,
);

export { AccumulatorType, AbstractAccumulatorModule$1 as default };
//# sourceMappingURL=module.js.map
