// 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.

export enum NetworkType {
  MainNet = 10,
  TestNet = 20,
  DevNet = 30,
}

export enum NetworkLayer {
  Layer1 = 1,
  Layer2 = 2,
  Layer3 = 3,
  Layer4 = 4,
  Layer5 = 5,
  Layer6 = 6,
  Layer7 = 7,
  Layer8 = 8,
  Layer9 = 9,
  Layer10 = 10,
}

export enum BlockStatusCode {
  AddedToQueue = 0,
  InAlreadyQueue = 1,
  InProgress = 57,
  WrongParameter = 45,
  WrongPublicKey = 10,
  WrongSignature = 2,
  WrongVolume = 5,
  WrongWallet = 67,

  WrongWallet_Sender = 6,
  WrongWallet_Receiver = 9,

  WalletDoesntExist = 11,
  InsufficientBalance = 12,
  PendingPreviousTransaction = 13,
  AnErrorOccurred = 99,
  Pending = 89,
  InQueue = 1,
  Completed = 22,
  Rejected = 97,
  Unknown = 78,
}

export interface CurrencyList {
  ReserveCurrency: boolean;
  Tag: string;
  Name: string;
  Logo: FileStorageStruct;
}

export interface FileStorageStruct {
  Used: boolean;
  Base64: string;
  Url: string;
  Source: string;
}

export interface WalletBalanceStruct {
  Wallet: string;
  Balance: Record<string, Record<string, string>>;
  RowNo: Number;
  UID: string;
}

export interface CryptoTransactionResult {
  ErrorNo: number;
  ID: string;
  Result: BlockStatusCode;
}

export interface KeyPair {
  PublicKey: string;
  PrivateKey: string;
  WalletKey: string;
  Words: string[];
}
