Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseRequest ¶
type BaseRequest struct {
Action string `json:"action"`
}
RPC requests
var SendAction BaseRequest = BaseRequest{Action: "send"}
send
type ClientMessage ¶
type ClientMessage struct { // Exclude this field from serialization (don't expose requester email to client) RequesterEmail string `json:"-"` BlockAward bool `json:"-"` MessageType MessageType `json:"request_type"` // We attach a unique request ID to each request, this links it to user requesting work RequestID string `json:"request_id"` Hash string `json:"hash"` DifficultyMultiplier int `json:"difficulty_multiplier"` // Awarded info ProviderEmail string `json:"-"` PercentOfPool float64 `json:"percent_of_pool"` EstimatedAward float64 `json:"estimated_award"` Precache bool `json:"precache"` }
Message sent from server -> client
type ClientWorkResponse ¶
type ClientWorkResponse struct { RequestID string `json:"request_id"` Hash string `json:"hash"` Result string `json:"result"` }
Work response sent from client -> server
type MessageType ¶
type MessageType string
const ( WorkGenerate MessageType = "work_generate" WorkCancel MessageType = "work_cancel" BlockAwarded MessageType = "block_awarded" )
type SendRequest ¶
type SendRequest struct { BaseRequest Wallet string `json:"wallet"` Source string `json:"source"` Destination string `json:"destination"` AmountRaw string `json:"amount"` ID string `json:"id"` PaidTo uuid.UUID `json:"-"` }
func (*SendRequest) Scan ¶
func (j *SendRequest) Scan(value interface{}) error
type SendResponse ¶
type SendResponse struct {
Block string `json:"block"`
}
Click to show internal directories.
Click to hide internal directories.