Documentation ¶
Index ¶
- type BlockHeader
- type CandidateResp
- type GetBlockReply
- type GetBlockReplyPart
- type JSONRpcResp
- type PoWSol
- type RPCClient
- func (r *RPCClient) Check() bool
- func (r *RPCClient) GetBalance(address string) (*big.Int, error)
- func (r *RPCClient) GetBlockByHeight(height int64) (*BlockHeader, error)
- func (r *RPCClient) GetInfo() map[string]interface{}
- func (r *RPCClient) GetPeerCount() (int64, error)
- func (r *RPCClient) GetPendingBlock() (*BlockHeader, error)
- func (r *RPCClient) GetTxReceipt(hash string) (*TxReceipt, error)
- func (r *RPCClient) GetWork() (*CandidateResp, error)
- func (r *RPCClient) SendTransaction(from, to, gas, gasPrice, value string, autoGas bool) (string, error)
- func (r *RPCClient) Sick() bool
- func (r *RPCClient) Sign(from string, s string) (string, error)
- func (r *RPCClient) SubmitSolution(params *SolutionReq) (bool, error)
- type SolutionReq
- type Tx
- type TxReceipt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockHeader ¶
type CandidateResp ¶
type GetBlockReply ¶
type GetBlockReply struct { Number string `json:"number"` Hash string `json:"hash"` Nonce string `json:"nonce"` Miner string `json:"miner"` Difficulty string `json:"difficulty"` Transactions []Tx `json:"transactions"` // https://github.com/ethereum/EIPs/issues/95 SealFields []string `json:"sealFields"` }
type GetBlockReplyPart ¶
type JSONRpcResp ¶
type JSONRpcResp struct { Id *json.RawMessage `json:"id"` Result *json.RawMessage `json:"result"` Error map[string]interface{} `json:"error"` }
type RPCClient ¶
type RPCClient struct { sync.RWMutex Url string Name string // contains filtered or unexported fields }
func NewRPCClient ¶
func (*RPCClient) GetBalance ¶
TODO: payer
func (*RPCClient) GetBlockByHeight ¶
func (r *RPCClient) GetBlockByHeight(height int64) (*BlockHeader, error)
DONE: in unlocker
func (*RPCClient) GetPendingBlock ¶
func (r *RPCClient) GetPendingBlock() (*BlockHeader, error)
TODO: in unlocker = get current block/height
func (*RPCClient) GetTxReceipt ¶
TODO: in payer
func (*RPCClient) GetWork ¶
func (r *RPCClient) GetWork() (*CandidateResp, error)
func (*RPCClient) SendTransaction ¶
func (r *RPCClient) SendTransaction(from, to, gas, gasPrice, value string, autoGas bool) (string, error)
TODO: in payer
func (*RPCClient) SubmitSolution ¶
func (r *RPCClient) SubmitSolution(params *SolutionReq) (bool, error)
type SolutionReq ¶
Click to show internal directories.
Click to hide internal directories.