Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizeResponse ¶
type AuthorizeResponse struct { ID uint Result bool Error StratumError }
type Block ¶
type Block struct { Version string PrevHash string CurrentHash string Ntime string Nbits string Nonce uint }
Block contains information about our blockchain header
type Config ¶
type Config struct { Currency string `json:"cryptocurrency"` Threads int `json:"threads"` Log bool `json:"log"` Solo bool `json:"solo"` Address string `json:"address"` Pool Pool `json:"pool"` }
Config struct for configuration settings
type ConfigureResponse ¶
type Job ¶
type Job struct { ID string Valid bool ExtraNonce1 string ExtraNonce2 uint Height int Target *big.Int Coinbase1 string Coinbase2 string MerkleBranch []string Block Block VersionRolling bool VersionRollingMask utils.Version }
Job contains information about the job generated
type NotificationResponse ¶
type Pool ¶
type Pool struct { URL string `json:"url"` User string `json:"user"` Pass string `json:"password"` KeepAlive bool `json:"keepalive"` RigID string `json:"rig-id"` }
Pool struct for stratum pool settings
type Stratum ¶
type Stratum struct {
// contains filtered or unexported fields
}
Stratum contains information about a stratum pool connection
func StratumClient ¶
StratumClient registers a new stratum client
func (*Stratum) Connect ¶
func (stratum *Stratum) Connect()
Connect simply connects to a stratum pool
func (*Stratum) Listen ¶
func (stratum *Stratum) Listen()
Listen always listens to incoming message from stratum server
type StratumError ¶
type StratumError struct { Num uint Str string Result *json.RawMessage }
StratumError struct for response error
type StratumRequest ¶
type StratumRequest struct { ID uint `json:"id"` Method string `json:"method"` Params []interface{} `json:"params"` }
StratumRequest message from stratum server
type StratumResponse ¶
type StratumResponse struct { Method string `json:"method"` ID uint `json:"id"` Params []string `json:"params"` Result *json.RawMessage `json:"result"` Error StratumError `json:"error"` }
StratumResponse message from statum server
Click to show internal directories.
Click to hide internal directories.