import * as CoreAssets from "../../../Assets.js";
/**
 * Default build options used for transaction construction when callers do not
 * supply explicit overrides.
 *
 * @since 2.0.0
 * @category builders
 */
export const DEFAULT_BUILD_OPTIONS = {
  coinSelection: "largest-first",
  onInsufficientChange: "error",
  setCollateral: 5000000n
};
/**
 * Create a fresh transaction-builder state for a build invocation.
 *
 * @since 2.0.0
 * @category builders
 */
export const makeInitialTxBuilderState = () => ({
  selectedUtxos: [],
  outputs: [],
  scripts: new Map(),
  totalOutputAssets: CoreAssets.zero,
  totalInputAssets: CoreAssets.zero,
  redeemers: new Map(),
  deferredRedeemers: new Map(),
  referenceInputs: [],
  certificates: [],
  withdrawals: new Map(),
  poolDeposits: new Map(),
  requiredSigners: [],
  auxiliaryData: undefined
});
/**
 * Create the initial phase-context state for a build invocation.
 *
 * @since 2.0.0
 * @category builders
 */
export const makeInitialPhaseContext = options => ({
  phase: "selection",
  attempt: 0,
  calculatedFee: 0n,
  shortfall: 0n,
  changeOutputs: [],
  leftoverAfterFee: CoreAssets.zero,
  canUnfrack: options.unfrack !== undefined
});
//# sourceMappingURL=state.js.map