import {
  bridge,
  bridgeSchema
} from "./chunk-EJDPIURX.js";
import {
  getWalletOrExit
} from "./chunk-QOYH6AOG.js";
import "./chunk-HFEYSQRZ.js";
import "./chunk-NPJV7AMV.js";
import "./chunk-LNQRIXFK.js";
import "./chunk-Y4VZACTC.js";
import {
  DESCRIPTIONS
} from "./chunk-EMQMCXIC.js";
import "./chunk-VDBUUHJF.js";
import "./chunk-ITCDZXBZ.js";
import "./chunk-QZBSRYSW.js";
import "./chunk-NROPRHIC.js";
import {
  errorResponse,
  fromNeverthrowError,
  outputAndExit,
  successResponse
} from "./chunk-7EBJ4BCH.js";
import "./chunk-C7KWYVS3.js";

// src/cli/commands/bridge.ts
var SURFACE = `cli:${DESCRIPTIONS.bridge.toolNames.cli}`;
var bridgeCommand = async (args) => {
  const wallets = await getWalletOrExit(args);
  const parsedArgs = bridgeSchema.safeParse(args);
  if (!parsedArgs.success) {
    return outputAndExit(
      errorResponse({
        code: "INVALID_INPUT",
        message: parsedArgs.error.message,
        surface: SURFACE,
        cause: "validation"
      }),
      args
    );
  }
  const bridgeResult = await bridge({ ...args, ...parsedArgs.data }, wallets);
  if (bridgeResult.isErr()) {
    return outputAndExit(fromNeverthrowError(bridgeResult), args);
  }
  return outputAndExit(
    successResponse({
      success: true
    }),
    args
  );
};
export {
  bridgeCommand
};
//# sourceMappingURL=bridge-55J4MKZR.js.map