Kevacoin stratum server for solo-mining
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.4 KiB

9 years ago
package stratum
import "encoding/json"
type JSONRpcReq struct {
Id *json.RawMessage `json:"id"`
Method string `json:"method"`
Params *json.RawMessage `json:"params"`
}
type JSONRpcResp struct {
Id *json.RawMessage `json:"id"`
Version string `json:"jsonrpc"`
Result interface{} `json:"result"`
Error interface{} `json:"error"`
}
type JSONPushMessage struct {
Version string `json:"jsonrpc"`
Method string `json:"method"`
Params interface{} `json:"params"`
}
type LoginParams struct {
Login string `json:"login"`
Pass string `json:"pass"`
Agent string `json:"agent"`
}
type GetJobParams struct {
Id string `json:"id"`
}
type SubmitParams struct {
Id string `json:"id"`
JobId string `json:"job_id"`
Nonce string `json:"nonce"`
Result string `json:"result"`
}
type JobReply struct {
Id string `json:"id"`
Job *JobReplyData `json:"job"`
Status string `json:"status"`
}
type JobReplyData struct {
Blob string `json:"blob"`
JobId string `json:"job_id"`
Target string `json:"target"`
Height int64 `json:"height"`
Algo string `json:"algo"`
SeedHash string `json:"seed_hash"`
NextSeedHash string `json:"next_seed_hash"`
9 years ago
}
type StatusReply struct {
9 years ago
Status string `json:"status"`
}
type ErrorReply struct {
Code int `json:"code"`
Message string `json:"message"`
}