"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
var package_management_service_client_exports = {};
__export(package_management_service_client_exports, {
  PackageManagementServiceClient: () => PackageManagementServiceClient
});
module.exports = __toCommonJS(package_management_service_client_exports);
var import_package_management_service = require("./package_management_service.cjs");
var import_runtime_rpc = require("@protobuf-ts/runtime-rpc");
class PackageManagementServiceClient {
  constructor(_transport) {
    this._transport = _transport;
    __publicField(this, "typeName", import_package_management_service.PackageManagementService.typeName);
    __publicField(this, "methods", import_package_management_service.PackageManagementService.methods);
    __publicField(this, "options", import_package_management_service.PackageManagementService.options);
  }
  /**
   * Returns the details of all Daml-LF packages known to the backing participant.
   *
   * @generated from protobuf rpc: ListKnownPackages
   */
  listKnownPackages(input, options) {
    const method = this.methods[0], opt = this._transport.mergeOptions(options);
    return (0, import_runtime_rpc.stackIntercept)("unary", this._transport, method, opt, input);
  }
  /**
   * Upload a DAR file to the backing participant.
   * Depending on the ledger implementation this might also make the package
   * available on the whole ledger. This call might not be supported by some
   * ledger implementations. Canton could be an example, where uploading a DAR
   * is not sufficient to render it usable, it must be activated first.
   * This call may:
   *
   * - Succeed, if the package was successfully uploaded, or if the same package
   *   was already uploaded before.
   * - Respond with a gRPC error
   *
   * @generated from protobuf rpc: UploadDarFile
   */
  uploadDarFile(input, options) {
    const method = this.methods[1], opt = this._transport.mergeOptions(options);
    return (0, import_runtime_rpc.stackIntercept)(
      "unary",
      this._transport,
      method,
      opt,
      input
    );
  }
  /**
   * Performs the same checks that UploadDarFile call perform, but doesn't
   * upload the DAR and does not make it available on the whole ledger.
   * This call may:
   *
   * - Succeed if the package is valid
   * - Respond with a gRPC error if the package is not valid
   *
   * @generated from protobuf rpc: ValidateDarFile
   */
  validateDarFile(input, options) {
    const method = this.methods[2], opt = this._transport.mergeOptions(options);
    return (0, import_runtime_rpc.stackIntercept)(
      "unary",
      this._transport,
      method,
      opt,
      input
    );
  }
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  PackageManagementServiceClient
});
//# sourceMappingURL=package_management_service.client.cjs.map