Skip to content

GridlessCompute/epicapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

epicapi - UNSTABLE | WORK IN PROGRESS

ePIC API wrapper for Go

Usage

import "github.com/GridlessCompute/epicapi"

func main() {
	// Creates a new API client
	// New(ip, port, password string)
	api := epicapi.New("192.168.1.1", "80", "password")
}

Functions

GET

// Capabilities returns a list of the device's capabilities
func (g *Get) Capabilities() (CapabilitiesResult, error)
// Clocks returns the clock speeds of the device
func (g *Get) Clocks() (ClocksResult, error)
// ClocksConfig returns the clock configuration of the device
func (g *Get) ClocksConfig() (ClocksConfigResult, error)
// Hashrate returns the hashrate of the device
func (g *Get) Hashrate() (HashrateResult, error)
// HashrateHistoryContinuous returns the continuous hashrate history of the device
func (g *Get) HashrateHistoryContinuous() (HashrateHistoryContinuousResult, error)
// HashrateHistoryDiscrete returns the discrete hashrate history of the device
func (g. *Get) HashrateHistoryDiscrete() (HashrateHistoryDiscreteResult, error)
// History returns the history of the device
func (g *Get) History() (HistoryResult, error)
// Network returns the network settings of the device
func (g *Get) Network() (NetworkResult, error)
// PerpetualTune returns the perpetual tune settings of the device
func (g *Get) PerpetualTune() (PerpetualTuneResult, error)
// Summary returns a summary of the device
func (g *Get) Summary() (SummaryResult, error)
// Temps returns the temperatures of the device
func (g *Get) Temps() (TempsResult, error)
// TempsBoard returns the board temperatures of the device
func (g *Get) TempsBoard() (TempsBoardResult, error)
// TempsChip returns the chip temperatures of the device
func (g *Get) TempsChip() (TempsChipResult, error)
// Voltages returns the voltages of the device
func (g *Get) Voltages() (VoltageResult, error)

POST

// Authenticate authenticates with the device
func (p *Post) Authenticate() error
// BoardEnable enables or disables a board
// BoardEnable(idx []int, enable bool)
func (p *Post) BoardEnable(idx []int, enable bool) error
// ClearHashrate clears the hashrate history of the device
func (p *Post) ClearHashrate() error
// Coin sets the coin to mine
// Coin(confs []StratumConfig, coin string, uniqueId bool)
func (p *Post) Coin(confs []StratumConfig, coin string, uniqueId bool) error
// CriticalTemp sets the critical temperature of the device
// CriticalTemp(temp int)
func (p *Post) CriticalTemp(temp int) error
// DefaultConfig resets the device to its default configuration
func (p *Post) DefaultConfig() error
// FanSpeed sets the fan speed of the device
// FanSpeed(idleSpeed, targetTemp int)
func (p *Post) FanSpeed(idleSpeed, targetTemp int) error
// Id sets the device ID
// Id(unique bool)
func (p *Post) Id(unique bool) error
// IdVarient sets the device ID varient
// IdVarient(varient int)
func (p *Post) IdVarient(varient int) error
// Identify identifies the device
// Identify(identify bool)
func (p *Post) Identify(identify bool) error
// IdleOnConnectionLost sets the device to idle when the connection is lost
// IdleOnConnectionLost(idle bool)
func (p *Post) IdleOnConnectionLost(idle bool) error
// Miner starts or stops the miner
// Miner(control bool)
func (p *Post) Miner(control bool) error
// Network sets the network settings of the device
// Network(dhcp bool)
func (p *Post) Network(dhcp bool) error
// Overdrive enables or disables overdrive
// Overdrive(od bool)
func (p *Post) Overdrive(od bool) error
// Password sets the password of the device
// Password(pass string)
func (p *Post) Password(pass string) error
// PerpetualTune enables or disables perpetual tune
// PerpetualTune(pt bool)
func (p *Post) PerpetualTune(pt bool) error
// Reboot reboots the device
// Reboot(delay int)
func (p *Post) Reboot(delay int) error
// ShutdownTemp sets the shutdown temperature of the device
// ShutdownTemp(temp int)
func (p *Post) ShutdownTemp(temp int) error
// SoftReboot soft reboots the device
func (p *Post) SoftReboot() error
// Tune tunes the device
// Tune(freq, volt float64)
func (p *Post) Tune(freq, volt float64) error
// TuneClockAll tunes the clock of all boards
// TuneClockAll(freq float64)
func (p *Post) TuneClockAll(freq float64) error
// TuneClockBoard tunes the clock of a specific board
// TuneClockBoard(settings []BoardTune)
func (p *Post) TuneClockBoard(settings []BoardTune) error
// TuneVoltage tunes the voltage of the device
// TuneVoltage(volt float64)
func (p *Post) TuneVoltage(volt float64) error

About

ePIC API wrapper for Go

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages