/**
 * TransactionResult - Base interface for transaction building results
 *
 * Provides core functionality available to all transaction builders regardless
 * of signing capability. This enables type-safe differentiation between
 * read-only clients (can build but not sign) and signing clients (can build and sign).
 *
 * @since 2.0.0
 * @category builders
 */
import { Effect } from "effect";
// ============================================================================
// TransactionResultBase Factory
// ============================================================================
/**
 * Create a TransactionResultBase instance for a built transaction without signing capability.
 *
 * Used by ReadOnlyClient which can build transactions but cannot sign them.
 * Provides access to the unsigned transaction, fake-witness transaction for fee validation,
 * and fee estimation.
 *
 * @since 2.0.0
 * @category constructors
 */
export const makeTransactionResult = params => {
  const {
    fee,
    transaction,
    transactionWithFakeWitnesses
  } = params;
  const resultEffect = {
    toTransaction: () => Effect.succeed(transaction),
    toTransactionWithFakeWitnesses: () => Effect.succeed(transactionWithFakeWitnesses),
    estimateFee: () => Effect.succeed(fee)
  };
  return {
    toTransaction: () => Promise.resolve(transaction),
    toTransactionWithFakeWitnesses: () => Promise.resolve(transactionWithFakeWitnesses),
    estimateFee: () => Promise.resolve(fee),
    effect: resultEffect
  };
};
//# sourceMappingURL=TransactionResult.js.map