pyasic
Base Miner
BaseMiner
is the basis for all miner classes, they all subclass (usually indirectly) from this class.
This class inherits from the MinerProtocol
, which outlines functionality for miners.
You may not instantiate this class on its own, only subclass from it.
Bases: MinerProtocol
Source code in pyasic/miners/base.py
| class BaseMiner(MinerProtocol):
def __init__(self, ip: str) -> None:
self.ip = ip
if self.expected_chips is None and self.raw_model is not None:
warnings.warn(
f"Unknown chip count for miner type {self.raw_model}, "
f"please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
)
# interfaces
if self._rpc_cls is not None:
self.rpc = self._rpc_cls(ip)
if self._web_cls is not None:
self.web = self._web_cls(ip)
if self._ssh_cls is not None:
self.ssh = self._ssh_cls(ip)
|