// AS4 Ledger Posting Service
// Atomic posting to DBIS ledger

import { postingEngineService } from '../posting-engine.service';
import { logger } from '@/infrastructure/monitoring/logger';

export class LedgerPostingService {
  /**
   * Post to DBIS ledger (uses existing posting engine)
   */
  async post(data: {
    instructionId: string;
    fromMemberId: string;
    toMemberId: string;
    debtorAccount: string;
    creditorAccount: string;
    amount: string;
    currency: string;
    valueDate: Date;
  }) {
    return postingEngineService.postInstruction(data);
  }
}

export const ledgerPostingService = new LedgerPostingService();
