{"version":3,"file":"module.cjs","sources":["../../../../../src/modules/abstract/accumulator/module.js"],"sourcesContent":["/* eslint-disable camelcase */\n\nimport { KBUniversalAccumulatorValue } from '@docknetwork/crypto-wasm-ts';\nimport { normalizeToHex, normalizeToU8a } from '../../../utils/types/bytes';\nimport {\n  AbstractBaseModule,\n  withAbstractParams,\n  withAbstractPublicKeys,\n} from '../common';\nimport {\n  AccumulatorCommon,\n  AccumulatorParams,\n  AccumulatorPublicKey,\n  KBUniversalAccumulator,\n  PositiveAccumulator,\n  UniversalAccumulator,\n} from '../../../types';\nimport { withExtendedPrototypeProperties } from '../../../utils';\n\nexport const AccumulatorType = {\n  VBPos: 0,\n  VBUni: 1,\n  KBUni: 2,\n};\n\n/** Class to manage accumulators on chain */\nclass AbstractAccumulatorModule extends withAbstractParams(\n  withAbstractPublicKeys(AbstractBaseModule),\n) {\n  static Params = AccumulatorParams;\n\n  static PublicKey = AccumulatorPublicKey;\n\n  /**\n   * Return the accumulated value as hex\n   * @param accumulated {Uint8Array|KBUniversalAccumulatorValue}\n   * @param typ {number} - Type of the accumulator\n   * @returns {string}\n   */\n  static accumulatedAsHex(accumulated, typ = AccumulatorType.VBPos) {\n    if (typ === AccumulatorType.VBPos || typ === AccumulatorType.VBUni) {\n      return normalizeToHex(accumulated);\n    } else if (typ === AccumulatorType.KBUni) {\n      return normalizeToHex(accumulated.toBytes());\n    } else {\n      throw new Error(`Unknown accumulator type ${typ}`);\n    }\n  }\n\n  /**\n   * Parse the given accumulated value in hex form\n   * @param accumulated {string}\n   * @param typ {number} - Type of the accumulator\n   * @returns {Uint8Array|KBUniversalAccumulatorValue}\n   */\n  static accumulatedFromHex(accumulated, typ = AccumulatorType.VBPos) {\n    if (typ === AccumulatorType.VBPos || typ === AccumulatorType.VBUni) {\n      return normalizeToU8a(accumulated);\n    } else if (typ === AccumulatorType.KBUni) {\n      return KBUniversalAccumulatorValue.fromBytes(normalizeToU8a(accumulated));\n    } else {\n      throw new Error(`Unknown accumulator type ${typ}`);\n    }\n  }\n\n  /**\n   * Creates and stores a new accumulator on the blockchain\n   *\n   * An accumulator is a cryptographic data structure used to maintain an aggregate value that can be updated incrementally.\n   * This method creates a new accumulator instance with the given ID and initial state.\n   *\n   * @param {string} id - Unique identifier for the accumulator\n   * @param {Accumulator} accumulator - Initial accumulator value to store\n   * @param {DidKeypair} didKeypair - Keypair used to sign the transaction\n   * @returns {Promise<*>} Promise resolving to the transaction result\n   */\n  async addAccumulator(id, accumulator, didKeypair, params) {\n    return await this.signAndSend(\n      await this.addAccumulatorTx(id, accumulator, didKeypair),\n      params,\n    );\n  }\n\n  /**\n   * Updates an existing accumulator on the blockchain\n   *\n   * This method replaces the current state of an accumulator with a new value.\n   * The accumulator must already exist (be previously created) to be updated.\n   *\n   * @param {string} id - Unique identifier of the accumulator to update\n   * @param {AccumulatorValue} accumulator - New accumulator value to set\n   * @param {DidKeypair} didKeypair - Keypair used to sign the transaction\n   * @returns {Promise<*>} Promise resolving to the transaction result\n   */\n  async updateAccumulator(\n    id,\n    accumulator,\n    { additions, removals, witnessUpdateInfo },\n    didKeypair,\n    params,\n  ) {\n    return await this.signAndSend(\n      await this.updateAccumulatorTx(\n        id,\n        accumulator,\n        { additions, removals, witnessUpdateInfo },\n        didKeypair,\n      ),\n      params,\n    );\n  }\n\n  /**\n   * Remove the accumulator from chain. This frees up the id for reuse.\n   *\n   * @param id - id to remove\n   * @param didKeypair - Signer's keypair reference\n   * @param params - Transaction parameters.\n   * @returns {Promise<*>}\n   */\n  async removeAccumulator(id, didKeypair, params) {\n    return await this.signAndSend(\n      await this.removeAccumulatorTx(id, didKeypair),\n      params,\n    );\n  }\n\n  /**\n   * Add a positive (add-only) accumulator\n   * @param id - Unique accumulator id\n   * @param accumulated - Current accumulated value.\n   * @param publicKeyRef - Reference to accumulator public key. If the reference contains the key id 0, it means the accumulator does not\n   * have any public key on the chain. This is useful for KVAC.\n   * @param didKeypair - Signer's keypair reference\n   * @param params - Transaction parameters.\n   * @returns {Promise<*>}\n   */\n  async addPositiveAccumulator(\n    id,\n    accumulated,\n    publicKeyRef,\n    didKeypair,\n    params,\n  ) {\n    return await this.signAndSend(\n      await this.addPositiveAccumulatorTx(\n        id,\n        accumulated,\n        publicKeyRef,\n        didKeypair,\n      ),\n      params,\n    );\n  }\n\n  /**\n   * Add universal (supports add/remove) accumulator\n   * @param id - Unique accumulator id\n   * @param accumulated - Current accumulated value.\n   * @param publicKeyRef - Reference to accumulator public key. If the reference contains the key id 0, it means the accumulator does not\n   * have any public key on the chain. This is useful for KVAC.\n   * @param maxSize - Maximum size of the accumulator\n   * @param didKeypair - Signer's keypair reference\n   * @param params - Transaction parameters.\n   * @returns {Promise<*>}\n   */\n  async addUniversalAccumulator(\n    id,\n    accumulated,\n    publicKeyRef,\n    maxSize,\n    didKeypair,\n    params,\n  ) {\n    return await this.signAndSend(\n      await this.addUniversalAccumulatorTx(\n        id,\n        accumulated,\n        publicKeyRef,\n        maxSize,\n        didKeypair,\n      ),\n      params,\n    );\n  }\n\n  /**\n   * Add KB universal (supports add/remove) accumulator\n   * @param id - Unique accumulator id\n   * @param accumulated - Current accumulated value.\n   * @param publicKeyRef - Reference to accumulator public key. If the reference contains the key id 0, it means the accumulator does not\n   * have any public key on the chain. This is useful for KVAC.\n   * @param didKeypair - Signer's keypair reference\n   * @param params - Transaction parameters.\n   * @returns {Promise<*>}\n   */\n  async addKBUniversalAccumulator(\n    id,\n    accumulated,\n    publicKeyRef,\n    didKeypair,\n    params,\n  ) {\n    return await this.signAndSend(\n      await this.addKBUniversalAccumulatorTx(\n        id,\n        accumulated,\n        publicKeyRef,\n        didKeypair,\n      ),\n      params,\n    );\n  }\n\n  /**\n   * Update existing positive (add-only) accumulator\n   * @param id - Unique accumulator id\n   * @param accumulated - Current accumulated value.\n   * @param publicKeyRef - Reference to accumulator public key. If the reference contains the key id 0, it means the accumulator does not\n   * have any public key on the chain. This is useful for KVAC.\n   * @param didKeypair - Signer's keypair reference\n   * @param params - Transaction parameters.\n   * @returns {Promise<*>}\n   */\n  async updatePositiveAccumulator(\n    id,\n    accumulated,\n    { additions, removals, witnessUpdateInfo },\n    publicKeyRef,\n    didKeypair,\n    params,\n  ) {\n    return await this.signAndSend(\n      await this.updatePositiveAccumulatorTx(\n        id,\n        accumulated,\n        { additions, removals, witnessUpdateInfo },\n        publicKeyRef,\n        didKeypair,\n      ),\n      params,\n    );\n  }\n\n  /**\n   * Update existing universal (supports update/remove) accumulator\n   * @param id - Unique accumulator id\n   * @param accumulated - Current accumulated value.\n   * @param publicKeyRef - Reference to accumulator public key. If the reference contains the key id 0, it means the accumulator does not\n   * have any public key on the chain. This is useful for KVAC.\n   * @param maxSize - Maximum size of the accumulator\n   * @param didKeypair - Signer's keypair reference\n   * @param params - Transaction parameters.\n   * @returns {Promise<*>}\n   */\n  async updateUniversalAccumulator(\n    id,\n    accumulated,\n    { additions, removals, witnessUpdateInfo },\n    publicKeyRef,\n    maxSize,\n    didKeypair,\n    params,\n  ) {\n    return await this.signAndSend(\n      await this.updateUniversalAccumulatorTx(\n        id,\n        accumulated,\n        { additions, removals, witnessUpdateInfo },\n        publicKeyRef,\n        maxSize,\n        didKeypair,\n      ),\n      params,\n    );\n  }\n\n  /**\n   * Update existing KB universal (supports update/remove) accumulator\n   * @param id - Unique accumulator id\n   * @param accumulated - Current accumulated value.\n   * @param publicKeyRef - Reference to accumulator public key. If the reference contains the key id 0, it means the accumulator does not\n   * have any public key on the chain. This is useful for KVAC.\n   * @param didKeypair - Signer's keypair reference\n   * @returns {Promise<*>}\n   */\n  async updateKBUniversalAccumulator(\n    id,\n    accumulated,\n    { additions, removals, witnessUpdateInfo },\n    publicKeyRef,\n    didKeypair,\n    params,\n  ) {\n    return await this.signAndSend(\n      await this.updateKBUniversalAccumulatorTx(\n        id,\n        accumulated,\n        { additions, removals, witnessUpdateInfo },\n        publicKeyRef,\n        didKeypair,\n      ),\n      params,\n    );\n  }\n\n  /**\n   * Add a positive (add-only) accumulator\n   * @param id - Unique accumulator id\n   * @param accumulated - Current accumulated value.\n   * @param publicKeyRef - Reference to accumulator public key. If the reference contains the key id 0, it means the accumulator does not\n   * have any public key on the chain. This is useful for KVAC.\n   * @param didKeypair - Signer's keypair reference\n   * @returns {Promise<*>}\n   */\n  async addPositiveAccumulatorTx(id, accumulated, publicKeyRef, didKeypair) {\n    return await this.addAccumulatorTx(\n      id,\n      new PositiveAccumulator(new AccumulatorCommon(accumulated, publicKeyRef)),\n      didKeypair,\n    );\n  }\n\n  /**\n   * Add universal (supports add/remove) accumulator\n   * @param id - Unique accumulator id\n   * @param accumulated - Current accumulated value.\n   * @param publicKeyRef - Reference to accumulator public key. If the reference contains the key id 0, it means the accumulator does not\n   * have any public key on the chain. This is useful for KVAC.\n   * @param maxSize - Maximum size of the accumulator\n   * @param didKeypair - Signer's keypair reference\n   * @returns {Promise<*>}\n   */\n  async addUniversalAccumulatorTx(\n    id,\n    accumulated,\n    publicKeyRef,\n    maxSize,\n    didKeypair,\n  ) {\n    return await this.addAccumulatorTx(\n      id,\n      new UniversalAccumulator(\n        new UniversalAccumulator.Class(\n          new AccumulatorCommon(accumulated, publicKeyRef),\n          maxSize,\n        ),\n      ),\n      didKeypair,\n    );\n  }\n\n  /**\n   * Add KB universal (supports add/remove) accumulator\n   * @param id - Unique accumulator id\n   * @param accumulated - Current accumulated value.\n   * @param publicKeyRef - Reference to accumulator public key. If the reference contains the key id 0, it means the accumulator does not\n   * have any public key on the chain. This is useful for KVAC.\n   * @param didKeypair - Signer's keypair reference\n   * @returns {Promise<*>}\n   */\n  async addKBUniversalAccumulatorTx(id, accumulated, publicKeyRef, didKeypair) {\n    return await this.addAccumulatorTx(\n      id,\n      new KBUniversalAccumulator(\n        new AccumulatorCommon(accumulated, publicKeyRef),\n      ),\n      didKeypair,\n    );\n  }\n\n  /**\n   * Update a positive (add-only) accumulator\n   * @param id - Unique accumulator id\n   * @param accumulated - Current accumulated value.\n   * @param publicKeyRef - Reference to accumulator public key. If the reference contains the key id 0, it means the accumulator does not\n   * have any public key on the chain. This is useful for KVAC.\n   * @param didKeypair - Signer's keypair reference\n   * @returns {Promise<*>}\n   */\n  async updatePositiveAccumulatorTx(\n    id,\n    accumulated,\n    { additions, removals, witnessUpdateInfo },\n    publicKeyRef,\n    didKeypair,\n  ) {\n    return await this.updateAccumulatorTx(\n      id,\n      new PositiveAccumulator(new AccumulatorCommon(accumulated, publicKeyRef)),\n      {\n        additions,\n        removals,\n        witnessUpdateInfo,\n      },\n      didKeypair,\n    );\n  }\n\n  /**\n   * Update universal (supports add/remove) accumulator\n   * @param id - Unique accumulator id\n   * @param accumulated - Current accumulated value.\n   * @param publicKeyRef - Reference to accumulator public key. If the reference contains the key id 0, it means the accumulator does not\n   * have any public key on the chain. This is useful for KVAC.\n   * @param maxSize - Maximum size of the accumulator\n   * @param didKeypair - Signer's keypair reference\n   * @returns {Promise<*>}\n   */\n  // eslint-disable-next-line sonarjs/no-identical-functions\n  async updateUniversalAccumulatorTx(\n    id,\n    accumulated,\n    { additions, removals, witnessUpdateInfo },\n    publicKeyRef,\n    maxSize,\n    didKeypair,\n  ) {\n    return await this.updateAccumulatorTx(\n      id,\n      new UniversalAccumulator(\n        new UniversalAccumulator.Class(\n          new AccumulatorCommon(accumulated, publicKeyRef),\n          maxSize,\n        ),\n      ),\n      {\n        additions,\n        removals,\n        witnessUpdateInfo,\n      },\n      didKeypair,\n    );\n  }\n\n  /**\n   * Update KB universal (supports add/remove) accumulator\n   * @param id - Unique accumulator id\n   * @param accumulated - Current accumulated value.\n   * @param publicKeyRef - Reference to accumulator public key. If the reference contains the key id 0, it means the accumulator does not\n   * have any public key on the chain. This is useful for KVAC.\n   * @param didKeypair - Signer's keypair reference\n   * @returns {Promise<*>}\n   */\n  // eslint-disable-next-line sonarjs/no-identical-functions\n  async updateKBUniversalAccumulatorTx(\n    id,\n    accumulated,\n    { additions, removals, witnessUpdateInfo },\n    publicKeyRef,\n    didKeypair,\n  ) {\n    return await this.updateAccumulatorTx(\n      id,\n      new KBUniversalAccumulator(\n        new AccumulatorCommon(accumulated, publicKeyRef),\n      ),\n      {\n        additions,\n        removals,\n        witnessUpdateInfo,\n      },\n      didKeypair,\n    );\n  }\n\n  /**\n   * Add an accumulator to the chain.\n   *\n   * @param id - Unique accumulator id\n   * @param accumulator - Accumulator value.\n   * @param signingKeyRef - Signer's keypair reference\n   * @returns {Promise<*>}\n   */\n  async addAccumulatorTx(_id, _accumulator, _didKeypair) {\n    throw new Error('Unimplemented');\n  }\n\n  /**\n   * Update existing accumulator on the chain.\n   *\n   * @param id - Unique accumulator id\n   * @param accumulator - Accumulator value.\n   * @param {object} changes\n   * @param signingKeyRef - Signer's keypair reference\n   * @returns {Promise<*>}\n   */\n  async updateAccumulatorTx(\n    _id,\n    _accumulator,\n    { additions: _, removals: __, witnessUpdateInfo: ___ },\n    _didKeypair,\n  ) {\n    throw new Error('Unimplemented');\n  }\n\n  /**\n   * Get the accumulator as an object. The field `type` in object specifies whether it is \"positive\" or \"universal\".\n   * Fields `created` and `lastModified` are identifiers where the accumulator was created and last updated respectively.\n   * Field `accumulated` contains the current accumulated value.\n   * @param id\n   * @param includeKey - Fetch public key for the given accumulator.\n   * @param includeKeyParams - Fetch public key params.\n   * @returns {Promise<Accumulator|null>}\n   */\n  async getAccumulator(_id, _includeKey = false, _includeKeyParams = false) {\n    throw new Error('Unimplemented');\n  }\n\n  /**\n   * Update given witness by downloading necessary accumulators (blocks) and applying the updates if found.\n   * **Both `from` and `to` are inclusive.**\n   *\n   * @param accumulatorId\n   * @param member\n   * @param witness - this will be updated to the latest witness\n   * @param from - identifier to start from (block number or collection item id)\n   * @param to - identifier to end in (block number or collection item id)\n   * @returns {Promise<void>}\n   */\n  async updateWitness(_accumulatorId, _member, _witness, _from, _to) {\n    throw new Error('Unimplemented');\n  }\n\n  /**\n   * Retrieves history for the accumulator with supplied identifier.\n   *\n   * @param {*} _accumulatorId\n   * @returns {?{ created: *, updates: Array<*> }}\n   */\n  async accumulatorHistory(_accumulatorId) {\n    throw new Error('Unimplemented');\n  }\n\n  /**\n   * Retrieves `Array` containing all versions of the accumulator with supplied identifier.\n   *\n   * @param {*} _accumulatorId\n   * @returns {Array<*>}\n   */\n  async accumulatorVersions(_accumulatorId) {\n    throw new Error('Unimplemented');\n  }\n}\n\nexport default withExtendedPrototypeProperties(\n  [\n    'getAccumulator',\n    'addAccumulatorTx',\n    'updateAccumulatorTx',\n    'removeAccumulatorTx',\n    'updateWitness',\n  ],\n  AbstractAccumulatorModule,\n);\n"],"names":["withAbstractParams","withAbstractPublicKeys","AbstractBaseModule","AccumulatorParams","AccumulatorPublicKey","normalizeToHex","normalizeToU8a","KBUniversalAccumulatorValue","PositiveAccumulator","AccumulatorCommon","UniversalAccumulator","KBUniversalAccumulator","withExtendedPrototypeProperties","AbstractAccumulatorModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;AAmBY,MAAC,eAAe,GAAG;AAC/B,EAAE,KAAK,EAAE,CAAC;AACV,EAAE,KAAK,EAAE,CAAC;AACV,EAAE,KAAK,EAAE,CAAC;AACV;;AAEA;kCACA,MAAM,yBAAyB,SAASA,0CAAkB;AAC1D,EAAEC,8CAAsB,CAACC,0CAAkB,CAAC;AAC5C,CAAC,CAAC;AACF,EAAE,OAAO,MAAM,GAAGC,0CAAiB;;AAEnC,EAAE,OAAO,SAAS,GAAGC,gDAAoB;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,OAAO,gBAAgB,CAAC,WAAW,EAAE,GAAG,GAAG,eAAe,CAAC,KAAK,EAAE;AACpE,IAAI,IAAI,GAAG,KAAK,eAAe,CAAC,KAAK,IAAI,GAAG,KAAK,eAAe,CAAC,KAAK,EAAE;AAC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