import type * as xrpl from '@interc0der/xrpl';
import type * as models from '@interc0der/xrpl/dist/npm/src/models';

export interface SortedTransactions {
  time: string;
  type: string;
  date: string;
  unix: number;
  txns: ProcessedTxn[];
}

export interface AccountTransaction {
  type: string;
  hash: string;
  date?: number;
}

export type ProcessedTxn = AccountTransaction & {
  source: string;
  time?: string;
  xrpl?: {
    tx?: models.Transaction & xrpl.ResponseOnlyTxInfo;
    meta: models.TransactionMetadata | string;
    ledger_index: number;
    tx_blob?: string;
    date?: number;
    validated: boolean;
    // details?: parser.Tx;
    details: undefined;
  };
  evm?: {
    tx: any;
  };
};
