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 { InteractiveSubmissionService } from "./interactive_submission_service.js";
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
class InteractiveSubmissionServiceClient {
  constructor(_transport) {
    this._transport = _transport;
    __publicField(this, "typeName", InteractiveSubmissionService.typeName);
    __publicField(this, "methods", InteractiveSubmissionService.methods);
    __publicField(this, "options", InteractiveSubmissionService.options);
  }
  /**
   * Requires `readAs` scope for the submitting party when LAPI User authorization is enabled
   *
   * @generated from protobuf rpc: PrepareSubmission
   */
  prepareSubmission(input, options) {
    const method = this.methods[0], opt = this._transport.mergeOptions(options);
    return stackIntercept("unary", this._transport, method, opt, input);
  }
  /**
   * @generated from protobuf rpc: ExecuteSubmission
   */
  executeSubmission(input, options) {
    const method = this.methods[1], opt = this._transport.mergeOptions(options);
    return stackIntercept("unary", this._transport, method, opt, input);
  }
  /**
   * A preferred package is the highest-versioned package for a provided package-name
   * that is vetted by all the participants hosting the provided parties.
   *
   * Ledger API clients should use this endpoint for constructing command submissions
   * that are compatible with the provided preferred package, by making informed decisions on:
   * - which are the compatible packages that can be used to create contracts
   * - which contract or exercise choice argument version can be used in the command
   * - which choices can be executed on a template or interface of a contract
   *
   * Can be accessed by any Ledger API client with a valid token when Ledger API authorization is enabled.
   *
   * Provided for backwards compatibility, it will be removed in the Canton version 3.4.0
   *
   * @generated from protobuf rpc: GetPreferredPackageVersion
   */
  getPreferredPackageVersion(input, options) {
    const method = this.methods[2], opt = this._transport.mergeOptions(options);
    return stackIntercept("unary", this._transport, method, opt, input);
  }
  /**
   * Compute the preferred packages for the vetting requirements in the request.
   * A preferred package is the highest-versioned package for a provided package-name
   * that is vetted by all the participants hosting the provided parties.
   *
   * Ledger API clients should use this endpoint for constructing command submissions
   * that are compatible with the provided preferred packages, by making informed decisions on:
   * - which are the compatible packages that can be used to create contracts
   * - which contract or exercise choice argument version can be used in the command
   * - which choices can be executed on a template or interface of a contract
   *
   * If the package preferences could not be computed due to no selection satisfying the requirements,
   * a `FAILED_PRECONDITION` error will be returned.
   *
   * Can be accessed by any Ledger API client with a valid token when Ledger API authorization is enabled.
   *
   * Experimental API: this endpoint is not guaranteed to provide backwards compatibility in future releases
   *
   * @generated from protobuf rpc: GetPreferredPackages
   */
  getPreferredPackages(input, options) {
    const method = this.methods[3], opt = this._transport.mergeOptions(options);
    return stackIntercept("unary", this._transport, method, opt, input);
  }
}
export {
  InteractiveSubmissionServiceClient
};
//# sourceMappingURL=interactive_submission_service.client.js.map