nicehash

package module
v0.0.0-...-db8a820 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Activity

type Activity string
const (
	DEPOSIT       Activity = "DEPOSIT"
	WITHDRAWAL    Activity = "WITHDRAWAL"
	HASHPOWER     Activity = "HASHPOWER"
	MINING        Activity = "MINING"
	EXCHANGE      Activity = "EXCHANGE"
	UNPAID_MINING Activity = "UNPAID_MINING"
	OTHER         Activity = "OTHER"
)

type ActivityCompletion

type ActivityCompletion string
const (
	COMPLETED ActivityCompletion = "COMPLETED"
	OPEN      ActivityCompletion = "OPEN"
	ALL       ActivityCompletion = "ALL"
)

type AlgoStats

type AlgoStats struct {
	Unpaid        bitcoin.Amount `json:"unpaid"`
	Profitability bitcoin.Amount `json:"profitability"`
	SpeedAccepted float64        `json:"speedAccepted"`
	SpeedRejected float64        `json:"speedRejected"`
	DisplaySuffix string         `json:"displaySuffix"`
	Active        bool           `json:"isActive"`
}

type Balance

type Balance struct {
	Active       bool
	TotalBalance bitcoin.Amount
	Available    bitcoin.Amount
	Debt         bitcoin.Amount
	Pending      bitcoin.Amount
}

type Client

type Client struct {
	DumpWriter io.Writer
	// contains filtered or unexported fields
}

func NewClient

func NewClient(OrgID string, key string, secret string) *Client

func (*Client) AccountingActivity

func (c *Client) AccountingActivity(currency Currency, typ Activity, stage ActivityCompletion) ([]Transaction, error)

func (*Client) AccountingBalance

func (c *Client) AccountingBalance(currency Currency) (*Balance, error)

func (*Client) AlgoStats

func (c *Client) AlgoStats() (map[string]AlgoStats, error)

func (*Client) MiningAddress

func (c *Client) MiningAddress() (string, error)

func (*Client) Rigs

func (c *Client) Rigs() ([]Rig, error)

type Currency

type Currency string

type Rig

type Rig struct {
	RigID        string         `json:"rigId"`
	StatusTime   int64          `json:"statusTime"`
	UnpaidAmount bitcoin.Amount `json:"unpaidAmount"`
}

type RigStats__

type RigStats__ struct {
	TimeStamp     int64          `json:"statsTime"`
	Market        string         `json:"market"`
	UnpaidAmount  bitcoin.Amount `json:"unpaidAmount"`
	Difficulty    float64        `json:"difficulty"`
	ProxyID       int            `json:"proxyId"`
	TimeConnected int64          `json:"timeConnected"`
	SpeedAccepted float64        `json:"speedAccepted"`
	Profitability float64        `json:"profitability"`
}

type Time

type Time int64

func (Time) Time

func (t Time) Time() time.Time

type Transaction

type Transaction struct {
	Id       string         `json:"id"`
	Amount   bitcoin.Amount `json:"amount"`
	Fee      bitcoin.Amount `json:"feeAmount"`
	Time     Time           `json:"time"`
	Type     Activity       `json:"type"`
	Currency Currency       `json:"activityCurrency"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL