import type { BitcoinDepositEvent } from './types';

export interface CustodyAdapter {
  allocateDepositAddress(input: { instructionId: string; clientId: string }): Promise<string>;
  listDepositEvents(cursor?: string): Promise<{ events: BitcoinDepositEvent[]; cursor?: string }>;
  getConfirmedReserveBalanceSats(): Promise<number>;
}

export interface MintJobSink {
  enqueue(job: {
    id: string;
    instructionId: string;
    basketMandateId: string;
    chain138VaultAddress: string;
    canonicalSymbol: 'cBTC';
    amountSats: number;
    status: 'queued';
    createdAt: string;
  }): Promise<void>;
}

export interface AuditPublisher {
  publish(record: {
    id: string;
    instructionId: string;
    category: 'deposit_instruction' | 'confirmation' | 'mint_job' | 'freeze';
    message: string;
    metadata?: Record<string, unknown>;
    createdAt: string;
  }): Promise<void>;
}

export interface OutstandingPolicy {
  getCurrentOutstandingSats(): Promise<number>;
  getMaxOutstandingSats(): Promise<number>;
}
