// Copyright (C) 2020-2022 Notus Network
//
// Notus Network is free software distributed under the MIT software license,
// see the accompanying file LICENSE in the main directory of the
// project or http://www.opensource.org/licenses/mit-license.php
// for more details.
//
// Redistribution and use in source and binary forms with or without
// modifications are permitted.

import {Nonce2} from './block';
import {NetworkType} from './general';

export interface ITransaction {
  In: Record<string, InValue>;
  Out: Record<string, Record<string, string>>;
  Validator: string;
}

export interface ISingleTransaction {
  TransactionInfo: InValue;
  TransactionId: string;
  rowNo: number;
  TimeStamp: string;
  ID: number;
  nonce: Nonce2;
}

export interface CryptoTransactionStruct {
  ErrorNo: number;
  UnlockTime: number;
  Currency: string;
  Sender: string;
  Receiver: string;
  Volume: string;
  PublicKey: string;
  Sign: string;
  CurveName: string;
  Network: NetworkType;
}

export interface CryptoTransactionBeforeStruct {
  UnlockTime: number;
  Currency: string;
  Sender: string;
  Receiver: string;
  Volume: string;
  PrivateKey: string;
  Network: NetworkType;
}

interface Sender {
  Wallet: string;
  Balance: Record<string, string>;
  WitnessRowNo: number;
  WitnessBlockUid: string;
}

interface Receiver {
  Wallet: string;
  Balance: Record<string, string>;
  WitnessRowNo: number;
  WitnessBlockUid: string;
}

interface InValue {
  Sender: Sender;
  Reciever: Receiver;
  Currency: string;
  Volume: string;
  Fee: string;
  PublicKey: string;
  Sign: string;
}
