import '../../../utils/types/array.js';
import 'crypto';
import { withExtendedPrototypeProperties } from '../../../utils/inheritance.js';
import 'bs58';
import 'multiformats/bases/base58';
import 'varint';
import '../../../utils/encoding/ss-58.js';
import '../common/abstract-api-provider.js';
import AbstractBaseModule from '../common/abstract-base-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';

/**
 * `Trust Registry` module.
 */
class AbstractTrustRegistryModule extends AbstractBaseModule {
  /**
   * Retrieves registry with provided identifier owned by supplied convener did.
   * @param {*} did
   * @param {*} id
   */
  async getRegistry(_did, _id) {
    throw new Error('Unimplemented');
  }

  /**
   * Retrieves all registries owned by supplied convener did.
   * @param {*} did
   */
  async getAllRegistriesByDid(_did) {
    throw new Error('Unimplemented');
  }

  /**
   * Creates new registry.
   *
   * @param {*} id
   * @param {*} info
   * @param {*} schemas
   * @param {*} didKeypair
   * @param {*} params
   * @returns Promise<*>
   */
  async createRegistry(id, info, schemas, didKeypair, params) {
    return await this.signAndSend(
      await this.createRegistryTx(id, info, schemas, didKeypair),
      params,
    );
  }

  /**
   * Updates existing registry.
   *
   * @param {*} id
   * @param {*} info
   * @param {*} schemas
   * @param {*} signerDid
   * @param {*} signingKeyRef
   * @param {*} params
   * @returns Promise<*>
   */
  async updateRegistry(id, info, schemas, didKeypair, params) {
    return await this.signAndSend(
      await this.updateRegistryTx(id, info, schemas, didKeypair),
      params,
    );
  }
}

var AbstractTrustRegistryModule$1 = withExtendedPrototypeProperties(
  [
    'getRegistry',
    'getAllRegistriesByDid',
    'createRegistryTx',
    'updateRegistryTx',
  ],
  AbstractTrustRegistryModule,
);

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