Example #1
0
 public function getBaseAPIForCurrency($cur, CurrencyFactory $factory)
 {
     $abbr = strtoupper($cur);
     $instance = $factory->loadCurrency($cur);
     if ($instance != null) {
         $abbr = $instance->getAbbr();
     }
     return "https://mupool.com/index.php?page=api&coin=" . $abbr . "&";
 }
Example #2
0
 public function getBaseAPIForCurrency($cur, CurrencyFactory $factory)
 {
     $abbr = $cur;
     $instance = $factory->loadCurrency($cur);
     if ($instance != null) {
         $abbr = strtolower($instance->getAbbr());
     }
     return "https://give-me-coins.com/pool/api-" . $abbr . "?api_key=";
 }
Example #3
0
 public function selectHashrate(CurrencyFactory $factory, $cur, $speed)
 {
     // find out the algorithm from CurrencyFactory
     $instance = $factory->loadCurrency($cur);
     $algorithm = "sha256";
     if ($instance != null && $instance instanceof HashableCurrency) {
         $algorithm = $instance->getAlgorithm();
     }
     switch ($algorithm) {
         case "scrypt":
             return $speed['MiningScrypt'];
         default:
             return $speed['MiningSHA-256'];
     }
 }