Skip to content

Commit

Permalink
4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
tutulino committed Nov 11, 2017
1 parent 5db715a commit 48a5229
Show file tree
Hide file tree
Showing 12 changed files with 371 additions and 48 deletions.
38 changes: 37 additions & 1 deletion Include.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ function Get-Pools {
if ($Location -ne "") {
$Return=@()
$AllPools2 | Sort-Object Info,Algorithm,LocationPriority | ForEach-Object {
$Ex = $Return | Where-Object Info -eq $_.Info | Where-Object Algorithm -eq $_.Algorithm
$Ex = $Return | Where-Object Info -eq $_.Info | Where-Object Algorithm -eq $_.Algorithm | Where-Object PoolName -eq $_.PoolName
if ($Ex.count -eq 0) {$Return += $_}
}
}
Expand Down Expand Up @@ -716,3 +716,39 @@ function clear-log{
$Files |ForEach-Object {Remove-Item $_.fullname}

}


#************************************************************************************************************************************************************************************
#************************************************************************************************************************************************************************************
#************************************************************************************************************************************************************************************



function get-WhattomineFactor ([string]$Algo) {

#WTM json is for 3xAMD 480 hashrate must adjust,
# to check result with WTM set WTM on "Difficulty for revenue" to "current diff" and "and sort by "current profit" set your algo hashrate from profits screen, WTM "Rev. BTC" and MM BTC/Day must be the same

switch ($_.Algo)
{
"Ethash"{$WTMFactor=79500000}
"Groestl"{$WTMFactor=54000000}
"Myriad-Groestl"{$WTMFactor=79380000}
"X11Gost"{$WTMFactor=20100000}
"Cryptonight"{$WTMFactor=2190}
"equihash"{$WTMFactor=870}
"lyra2v2"{$WTMFactor=14700000}
"Neoscrypt"{$WTMFactor=1950000}
"Lbry"{$WTMFactor=285000000}
"Blake2b"{$WTMFactor=2970000000}
"Blake14r"{$WTMFactor=4200000000}
"Pascal"{$WTMFactor=2070000000}
"skunk"{$WTMFactor=54000000}
}



$WTMFactor

}

17 changes: 1 addition & 16 deletions Megaminer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -210,22 +210,7 @@ if ($MiningMode -eq "manual"){
{

if ($WtmCoin.difficulty24 -ne 0) {$_.DiffChange24h=(1-($WtmCoin.difficulty/$WtmCoin.difficulty24))*100}
#WTM returns default data as 3x480 hashrates
$WTMFactor=$null
switch ($_.Algorithm)
{
"Ethash"{$WTMFactor=84000000}
"Groestl"{$WTMFactor=630900000 }
"X11Gost"{$WTMFactor=20100000}
"Cryptonight"{$WTMFactor=2190}
"equihash"{$WTMFactor=870}
"lyra2v2"{$WTMFactor=14700000}
"Neoscrypt"{$WTMFactor=1950000}
"Lbry"{$WTMFactor=315000000}
"sia"{$WTMFactor=3450000000} #Blake2b
"decred"{$WTMFactor=5910000000} #Blake14r
"Pascal"{$WTMFactor=2100000000}
}
$WTMFactor = get-WhattomineFactor ($_.Algo)

if ($WTMFactor -ne $null) {
$_.Reward=[double]([double]$WtmCoin.estimated_rewards * ([double]$_.YourHashRate/[double]$WTMFactor))
Expand Down
148 changes: 148 additions & 0 deletions Pools/AHASHPOOL.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
param(
[Parameter(Mandatory = $true)]
[String]$Querymode = $null ,
[Parameter(Mandatory = $false)]
[pscustomobject]$Info
)

#. .\..\Include.ps1

$Name = (Get-Item $script:MyInvocation.MyCommand.Path).BaseName
$ActiveOnManualMode = $true
$ActiveOnAutomaticMode = $true
$ActiveOnAutomatic24hMode = $true
$AbbName = 'AHASH'
$WalletMode ='WALLET'
$Result = @()




#****************************************************************************************************************************************************************************************
#****************************************************************************************************************************************************************************************
#****************************************************************************************************************************************************************************************

if ($Querymode -eq "info"){
$Result = [PSCustomObject]@{
Disclaimer = "Anonymous, autoexchange to selected coin in config.txt"
ActiveOnManualMode=$ActiveOnManualMode
ActiveOnAutomaticMode=$ActiveOnAutomaticMode
ActiveOnAutomatic24hMode=$ActiveOnAutomatic24hMode
ApiData = $True
AbbName=$AbbName
WalletMode=$WalletMode
}
}






#****************************************************************************************************************************************************************************************
#****************************************************************************************************************************************************************************************
#****************************************************************************************************************************************************************************************



if ($Querymode -eq "wallet") {


try {
$http="http://www.ahashpool.com/api/wallet?address="+$Info.user
$Aha_Request = Invoke-WebRequest -UserAgent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36" $http -UseBasicParsing -timeoutsec 10 | ConvertFrom-Json
}
catch {}


if ($Aha_Request -ne $null -and $Aha_Request -ne ""){
$Result = [PSCustomObject]@{
Pool =$name
currency = $Aha_Request.currency
balance = $Aha_Request.balance
}
remove-variable Aha_Request
}


}




#****************************************************************************************************************************************************************************************
#****************************************************************************************************************************************************************************************
#****************************************************************************************************************************************************************************************

if (($Querymode -eq "core" ) -or ($Querymode -eq "Menu")){

$retries=1
do {
try {
$Aha_Request = Invoke-WebRequest "http://www.ahashpool.com/api/currencies" -UserAgent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36" -UseBasicParsing -timeout 5
$Aha_Request = $Aha_Request | ConvertFrom-Json
#$Zpool_Request=get-content "..\zpool_request.json" | ConvertFrom-Json

}
catch {}
$retries++
if ($Aha_Request -eq $null -or $Aha_Request -eq "") {start-sleep 5}
} while ($Aha_Request -eq $null -and $retries -le 3)

if ($retries -gt 3) {
WRITE-HOST 'AHASHPOOL API NOT RESPONDING...ABORTING'
EXIT
}


$Aha_Request | Get-Member -MemberType properties| ForEach-Object {

$coin=$Aha_Request | Select-Object -ExpandProperty $_.name


$Aha_Algorithm = get-algo-unified-name $coin.algo
$Aha_coin = get-coin-unified-name $coin.name
$Aha_Simbol=$_.name


$Divisor = Get-Algo-Divisor $Aha_Algorithm



$Result+=[PSCustomObject]@{
Algorithm = $Aha_Algorithm
Info = $Aha_coin
Price = [Double]$coin.estimate / $Divisor
Price24h = [Double]$coin.actual_last24h / $Divisor
Protocol = "stratum+tcp"
Host = $coin.algo + ".mine.ahashpool.com"
Port = $coin.port
User = $CoinsWallets.get_item($Currency)
Pass = "c=$Currency,$WorkerName,stats"
Location = 'US'
SSL = $false
Symbol = $Aha_Simbol
AbbName = $AbbName
ActiveOnManualMode = $ActiveOnManualMode
ActiveOnAutomaticMode = $ActiveOnAutomaticMode
PoolWorkers = $coin.Workers
PoolHashRate = $coin.HashRate
Blocks_24h = $coin."24h_blocks"
WalletMode = $WalletMode
PoolName = $Name
}


}

remove-variable Aha_Request
}


#****************************************************************************************************************************************************************************************
#****************************************************************************************************************************************************************************************
#****************************************************************************************************************************************************************************************

$Result |ConvertTo-Json | Set-Content ("$name.tmp")
remove-variable Result

2 changes: 1 addition & 1 deletion Pools/BLOCKS_FACTORY.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if ($Querymode -eq "info"){

if (($Querymode -eq "core" ) -or ($Querymode -eq "Menu")){
$Pools=@()
$Pools +=[pscustomobject]@{"coin" = "DIGIBYTE";"algo"="SKEIN"; "symbol"= "DGB";"server"="s1.theblocksfactory.com"; "port"= "9002";"location"="US"};
$Pools +=[pscustomobject]@{"coin" = "DIGIBYTE";"algo"="SKEIN"; "symbol"= "DGB";"server"="s1.theblocksfactory.com"; "port"= "9001";"location"="US"};
$Pools +=[pscustomobject]@{"coin" = "FEATHERCOIN"; "algo"="NEOSCRYPT"; "symbol"= "FTC"; "server"="s1.theblocksfactory.com";"port"="3333";"location"="US"}
$Pools +=[pscustomobject]@{"coin" = "PHOENIXCOIN"; "algo"="NEOSCRYPT"; "symbol"= "PXC"; "server"="s1.theblocksfactory.com";"port"="3332";"location"="US"}
$Pools +=[pscustomobject]@{"coin" = "ORBITCOIN"; "algo"="NEOSCRYPT"; "symbol"= "ORB"; "server"="s1.theblocksfactory.com";"port"="3334";"location"="US"}
Expand Down
2 changes: 1 addition & 1 deletion Pools/Hash_Refinery.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ if (($Querymode -eq "core" ) -or ($Querymode -eq "Menu")){

}

remove-variable HR_Request

}


Expand Down
8 changes: 4 additions & 4 deletions Pools/SUPRNOVA.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ if (($Querymode -eq "core" ) -or ($Querymode -eq "Menu")){
$Pools +=[pscustomobject]@{"coin" = "SIBCOIN";"algo"="X11gost"; "symbol"= "ETH";"server"="sib.suprnova.cc"; "port"= "3458";"location"="US"};
$Pools +=[pscustomobject]@{"coin" = "UBIQ";"algo"="Ethash"; "symbol"= "UBQ";"server"="ubiq.suprnova.cc"; "port"= "3030";"location"="US"};
$Pools +=[pscustomobject]@{"coin" = "EXPANSE";"algo"="Ethash"; "symbol"= "UBQ";"server"="exp.suprnova.cc"; "port"= "3333";"location"="US"};
$Pools +=[pscustomobject]@{"coin" = "BITSEND";"algo"="Xevan"; "symbol"= "BSD";"server"="bsd.suprnova.cc"; "port"= "8686";"location"="US"};



$Pools +=[pscustomobject]@{"coin" = "ELECTRONEUM";"algo"="CRYPTONIGHT"; "symbol"= "ETN";"server"="etn.suprnova.cc"; "port"= "8875";"location"="US"};
$Pools +=[pscustomobject]@{"coin" = "SMARTCASH";"algo"="keccak"; "symbol"= "SMART";"server"="smart.suprnova.cc"; "port"= "4192";"location"="US"};
$Pools +=[pscustomobject]@{"coin" = "BITCOINZ";"algo"="equihash"; "symbol"= "BTCZ";"server"="btcz.suprnova.cc"; "port"= "5586";"location"="US"};
$Pools +=[pscustomobject]@{"coin" = "BITCOINGOLD";"algo"="equihash"; "symbol"= "BTG";"server"="btg.suprnova.cc"; "port"= "8816";"location"="US"};


#$Pools +=[pscustomobject]@{"coin"= "SPREADCOIN";"algo"="SPREADX11"; "symbol"= "SPR";"server"="spr.suprnova.cc"; "port"= "6666";"location"="US"}
Expand Down
Loading

0 comments on commit 48a5229

Please sign in to comment.