Documentation ¶
Index ¶
- func RandomInt() string
- type BlockTemplate
- type DummyOk
- type DummyResponse
- type DummyStratumService
- func (d *DummyStratumService) HandleLogin(id *json.RawMessage, minerId string) (*LoginResponse, error)
- func (d *DummyStratumService) HandleLoginWithTemplate(id *json.RawMessage, params map[string]string) (*LoginResponse, error)
- func (d *DummyStratumService) HandleNewJob(params map[string]string) (*JobResponse, error)
- func (d *DummyStratumService) HandleSubmit(id *json.RawMessage, result *json.RawMessage) (*SubmitResponse, error)
- type Job
- type JobResponse
- type JobWrapper
- type LoginRequest
- type LoginResponse
- type OkMsg
- type StratumRPCService
- func (s *StratumRPCService) HandleLoginWithTemplate(id *json.RawMessage, params map[string]string) (*LoginResponse, error)
- func (s *StratumRPCService) HandleNewJob(params map[string]string) (*JobResponse, error)
- func (s *StratumRPCService) HandleSubmit(id *json.RawMessage, params *json.RawMessage) (*SubmitResponse, error)
- type StratumService
- type SubmitResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BlockTemplate ¶
type DummyOk ¶
type DummyOk struct { Id *json.RawMessage `json:"id"` Version string `json:"jsonrpc"` Result OkMsg `json:"result"` }
func GetDummyOk ¶
func GetDummyOk(id *json.RawMessage) DummyOk
type DummyResponse ¶
type DummyResponse struct { Id *json.RawMessage `json:"id"` Version string `json:"jsonrpc"` Result JobWrapper `json:"result"` }
func GetDummyResponse ¶
func GetDummyResponse(id *json.RawMessage) DummyResponse
type DummyStratumService ¶
type DummyStratumService struct { }
func (*DummyStratumService) HandleLogin ¶
func (d *DummyStratumService) HandleLogin(id *json.RawMessage, minerId string) (*LoginResponse, error)
func (*DummyStratumService) HandleLoginWithTemplate ¶
func (d *DummyStratumService) HandleLoginWithTemplate(id *json.RawMessage, params map[string]string) (*LoginResponse, error)
func (*DummyStratumService) HandleNewJob ¶
func (d *DummyStratumService) HandleNewJob(params map[string]string) (*JobResponse, error)
func (*DummyStratumService) HandleSubmit ¶
func (d *DummyStratumService) HandleSubmit(id *json.RawMessage, result *json.RawMessage) (*SubmitResponse, error)
type JobResponse ¶
type JobWrapper ¶
func GetDummyJobWrapper ¶
func GetDummyJobWrapper() JobWrapper
type LoginRequest ¶
type LoginResponse ¶
type LoginResponse struct { Id *json.RawMessage `json:"id"` Version string `json:"jsonrpc"` Result map[string]interface{} `json:"result,omitempty"` }
type StratumRPCService ¶
type StratumRPCService struct {
// contains filtered or unexported fields
}
func (*StratumRPCService) HandleLoginWithTemplate ¶
func (s *StratumRPCService) HandleLoginWithTemplate(id *json.RawMessage, params map[string]string) (*LoginResponse, error)
func (*StratumRPCService) HandleNewJob ¶
func (s *StratumRPCService) HandleNewJob(params map[string]string) (*JobResponse, error)
func (*StratumRPCService) HandleSubmit ¶
func (s *StratumRPCService) HandleSubmit(id *json.RawMessage, params *json.RawMessage) (*SubmitResponse, error)
"params":{ "id":"3220921a94dd7ebacc85bdbf508b23e6545c80fb81", "job_id":"3220921a94dd7ebacc85bdbf508b23e6545c80fb81", "nonce":"f1830100", "result":"c68384ce77a3f4b1ffacd7e94b42f7da827e46fd3e8dfba3caa5eacf6cca6a01" }
type StratumService ¶
type StratumService interface { HandleLoginWithTemplate(*json.RawMessage, map[string]string) (*LoginResponse, error) HandleSubmit(*json.RawMessage, *json.RawMessage) (*SubmitResponse, error) HandleNewJob(map[string]string) (*JobResponse, error) }
func GetDummyStratumService ¶
func GetDummyStratumService() StratumService
func NewStratumRPCService ¶
func NewStratumRPCService() StratumService
type SubmitResponse ¶
type SubmitResponse struct { Id *json.RawMessage `json:"id"` Version string `json:"jsonrpc"` Result map[string]string `json:"result,omitempty"` }
Click to show internal directories.
Click to hide internal directories.