Files
drjones 3678b199d0
Some checks failed
Test / test (push) Has been cancelled
Initial commit: AetherForge Linux (forge-mesh) v0.1.0-dev
2026-07-04 09:31:23 +00:00

41 lines
1.1 KiB
Go

package policy
import (
"forge-mesh/internal/api/types"
)
// DefaultMiningProfile returns the standard tier order for new agents.
func DefaultMiningProfile(wallet string) types.MiningProfile {
if wallet == "" {
wallet = "WALLET_UNSET"
}
return types.MiningProfile{
ID: "default",
Name: "Default tier chain",
WalletAddress: wallet,
PolicyFromServer: true,
Tiers: []types.MiningTierSpec{
{Type: "oci", Duration: 5, Config: map[string]string{"image": "docker.io/xmrig/xmrig:latest"}},
{Type: "xmrig", Duration: 10, Config: map[string]string{"algo": "rx/0"}},
{Type: "gpu", Duration: 10, Config: map[string]string{"algo": "kawpow", "coin": "RVN"}},
{Type: "stratum", Duration: 0, Config: map[string]string{"algo": "rx/0"}},
},
}
}
// TierDisplayName maps tier type to a human label.
func TierDisplayName(tierType string) string {
switch tierType {
case "oci":
return "OCI podman"
case "xmrig":
return "Bundled xmrig"
case "gpu", "lolminer":
return "GPU lolMiner"
case "stratum":
return "Stratum direct"
default:
return tierType
}
}