export type DepositInstructionStatus =
  | 'instruction_created'
  | 'pending_confirmations'
  | 'confirmed'
  | 'minted'
  | 'frozen';

export interface BasketMandateSnapshot {
  id: string;
  clientId: string;
  chain138VaultAddress: string;
  allocations: Array<{
    symbol: string;
    targetWeightBps: number;
  }>;
}

export interface DepositInstruction {
  id: string;
  basketMandate: BasketMandateSnapshot;
  depositAddress: string;
  expectedAmountSats?: number;
  currentConfirmations: number;
  confirmationsRequired: number;
  status: DepositInstructionStatus;
  observedTxId?: string;
  freezeReason?: string;
  createdAt: string;
  updatedAt: string;
}

export interface BitcoinDepositEvent {
  instructionId: string;
  txId: string;
  confirmations: number;
  amountSats: number;
  type: 'deposit' | 'reorg';
  observedAt?: string;
}

export interface MintJob {
  id: string;
  instructionId: string;
  basketMandateId: string;
  chain138VaultAddress: string;
  canonicalSymbol: 'cBTC';
  amountSats: number;
  status: 'queued';
  createdAt: string;
}

export interface AuditRecord {
  id: string;
  instructionId: string;
  category: 'deposit_instruction' | 'confirmation' | 'mint_job' | 'freeze';
  message: string;
  metadata?: Record<string, unknown>;
  createdAt: string;
}
