"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 update_service_client_exports = {};
__export(update_service_client_exports, {
  UpdateServiceClient: () => UpdateServiceClient
});
module.exports = __toCommonJS(update_service_client_exports);
var import_update_service = require("./update_service.cjs");
var import_runtime_rpc = require("@protobuf-ts/runtime-rpc");
class UpdateServiceClient {
  constructor(_transport) {
    this._transport = _transport;
    __publicField(this, "typeName", import_update_service.UpdateService.typeName);
    __publicField(this, "methods", import_update_service.UpdateService.methods);
    __publicField(this, "options", import_update_service.UpdateService.options);
  }
  /**
   * Read the ledger's filtered update stream for the specified contents and filters.
   * It returns the event types in accordance with the stream contents selected. Also the selection criteria
   * for individual events depends on the transaction shape chosen.
   *
   * - ACS delta: a requesting party must be a stakeholder of an event for it to be included.
   * - ledger effects: a requesting party must be a witness of an en event for it to be included.
   *
   * @generated from protobuf rpc: GetUpdates
   */
  getUpdates(input, options) {
    const method = this.methods[0], opt = this._transport.mergeOptions(options);
    return (0, import_runtime_rpc.stackIntercept)(
      "serverStreaming",
      this._transport,
      method,
      opt,
      input
    );
  }
  /**
   * Provided for backwards compatibility, it will be removed in the Canton version 3.4.0.
   * Read the ledger's complete transaction tree stream and related (un)assignments for a set of parties.
   * The stream will be filtered only by the parties as wildcard parties.
   * The template/interface filters describe the respective fields in the ``CreatedEvent`` results.
   *
   * @deprecated
   * @generated from protobuf rpc: GetUpdateTrees
   */
  getUpdateTrees(input, options) {
    const method = this.methods[1], opt = this._transport.mergeOptions(options);
    return (0, import_runtime_rpc.stackIntercept)(
      "serverStreaming",
      this._transport,
      method,
      opt,
      input
    );
  }
  /**
   * Provided for backwards compatibility, it will be removed in the Canton version 3.4.0.
   * Lookup a transaction tree by its offset.
   * For looking up a transaction instead of a transaction tree, please see GetTransactionByEventId
   * If the transaction cannot be found for the request, or all the events are filtered, a TRANSACTION_NOT_FOUND error will be raised.
   *
   * @deprecated
   * @generated from protobuf rpc: GetTransactionTreeByOffset
   */
  getTransactionTreeByOffset(input, options) {
    const method = this.methods[2], opt = this._transport.mergeOptions(options);
    return (0, import_runtime_rpc.stackIntercept)("unary", this._transport, method, opt, input);
  }
  /**
   * Provided for backwards compatibility, it will be removed in the Canton version 3.4.0.
   * Lookup a transaction tree by its ID.
   * For looking up a transaction instead of a transaction tree, please see GetTransactionById
   * If the transaction cannot be found for the request, or all the events are filtered, a TRANSACTION_NOT_FOUND error will be raised.
   *
   * @deprecated
   * @generated from protobuf rpc: GetTransactionTreeById
   */
  getTransactionTreeById(input, options) {
    const method = this.methods[3], opt = this._transport.mergeOptions(options);
    return (0, import_runtime_rpc.stackIntercept)("unary", this._transport, method, opt, input);
  }
  /**
   * Provided for backwards compatibility, it will be removed in the Canton version 3.4.0.
   * Lookup a transaction by its offset.
   * If there is no transaction with this offset, or all the events are filtered, a TRANSACTION_NOT_FOUND error will be raised.
   * Use a wildcard template filter if you want to retrieve any transaction visible to the parties you can read as.
   *
   * @deprecated
   * @generated from protobuf rpc: GetTransactionByOffset
   */
  getTransactionByOffset(input, options) {
    const method = this.methods[4], opt = this._transport.mergeOptions(options);
    return (0, import_runtime_rpc.stackIntercept)("unary", this._transport, method, opt, input);
  }
  /**
   * Provided for backwards compatibility, it will be removed in the Canton version 3.4.0.
   * Lookup a transaction by its ID.
   * If there is no transaction with this id, or all the events are filtered, a TRANSACTION_NOT_FOUND error will be raised.
   * Use a wildcard template filter if you want to retrieve any transaction visible to the parties you can read as.
   *
   * @deprecated
   * @generated from protobuf rpc: GetTransactionById
   */
  getTransactionById(input, options) {
    const method = this.methods[5], opt = this._transport.mergeOptions(options);
    return (0, import_runtime_rpc.stackIntercept)("unary", this._transport, method, opt, input);
  }
  /**
   * Lookup an update by its offset.
   * If there is no update with this offset, or all the events are filtered, an UPDATE_NOT_FOUND error will be raised.
   *
   * @generated from protobuf rpc: GetUpdateByOffset
   */
  getUpdateByOffset(input, options) {
    const method = this.methods[6], opt = this._transport.mergeOptions(options);
    return (0, import_runtime_rpc.stackIntercept)(
      "unary",
      this._transport,
      method,
      opt,
      input
    );
  }
  /**
   * Lookup an update by its ID.
   * If there is no update with this ID, or all the events are filtered, an UPDATE_NOT_FOUND error will be raised.
   *
   * @generated from protobuf rpc: GetUpdateById
   */
  getUpdateById(input, options) {
    const method = this.methods[7], 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 = {
  UpdateServiceClient
});
//# sourceMappingURL=update_service.client.cjs.map