Move coins data function to separated file
[elbandi:minifaucet.git] / coindata.php
1 <?php
2
3 function getCoinName($cointype)
4 {
5     switch ($cointype) {
6         case "BTC":
7             return "bitcoin";
8         case "LTC":
9             return "litecoin";
10         case "NMC":
11             return "namecoin";
12         case "BTCTEST":
13             return "bitcoin";
14         case "NVC":
15             return "novacoin";
16         case "PPC":
17             return "peercoin";
18         case "DOGE":
19             return "dogecoin";
20         case "WDC":
21             return "worldcoin";
22         default:
23             return "bitcoin";
24     }
25 }
26
27 function getSubunitName($cointype)
28 { // plural!!!
29     switch ($cointype) {
30         case "BTC":
31             return "satoshis";
32         case "LTC":
33             return "microcoins"; // 1000 * 1000
34         case "NMC":
35             return "microcoins"; // 1000 * 1000
36         case "BTCTEST":
37             return "satoshis";
38         case "NVC":
39             return "millicoins"; // 1000
40         case "PPC":
41             return "microcoins"; // 1000 * 1000
42         case "DOGE":
43             return "microdoges"; // 1000 * 1000
44         case "WDC":
45             return "microcoins";
46         default:
47             return "satoshis";
48     }
49 }
50
51 function getSubunitDivider($cointype)
52 {
53     switch ($cointype) {
54         case "BTC":
55             return 100 * 1000 * 1000;
56         case "LTC":
57             return 1000 * 1000;
58         case "NMC":
59             return 1000 * 1000;
60         case "BTCTEST":
61             return 100 * 1000 * 1000;
62         case "NVC":
63             return 1000;
64         case "PPC":
65             return 1000 * 1000;
66         case "DOGE":
67             return 1000 * 1000;
68         case "WDC":
69             return 1000 * 1000;
70         default:
71             return 100 * 1000 * 1000;
72     }
73 }