var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
import { PackageManagementService } from "./package_management_service.js";
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
class PackageManagementServiceClient {
  constructor(_transport) {
    this._transport = _transport;
    __publicField(this, "typeName", PackageManagementService.typeName);
    __publicField(this, "methods", PackageManagementService.methods);
    __publicField(this, "options", 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 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 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 stackIntercept(
      "unary",
      this._transport,
      method,
      opt,
      input
    );
  }
}
export {
  PackageManagementServiceClient
};
//# sourceMappingURL=package_management_service.client.js.map