/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { BdxSession } from "./BdxSession.js";
class BdxClient {
  #session;
  /**
   * Create a BDX client to initiate a BDX transfer as sender.
   * A file designator needs to be provided and needs to exist in the storage context.
   */
  static asSender(messenger, options) {
    return new BdxClient(BdxSession.asSender(messenger, options));
  }
  /**
   * Create a BDX client to initiate a BDX transfer as receiver.
   * A file designator needs to be provided. The content will be written to the storage context.
   */
  static asReceiver(messenger, options) {
    return new BdxClient(BdxSession.asReceiver(messenger, options));
  }
  constructor(bdxSession) {
    this.#session = bdxSession;
  }
  get progressInfo() {
    return this.#session.progressInfo;
  }
  get progressFinished() {
    return this.#session.progressFinished;
  }
  /** This is the main entry point to initiate and process the BDX transfer. */
  processTransfer() {
    return this.#session.processTransfer();
  }
  close() {
    return this.#session.close();
  }
}
export {
  BdxClient
};
//# sourceMappingURL=BdxClient.js.map
