Documentation ¶
Index ¶
- type GetBlockReply
- type GetBlockReplyPart
- type JSONRpcResp
- type RPCClient
- func (r *RPCClient) Check() bool
- func (r *RPCClient) GetBalance(address string) (*big.Int, error)
- func (r *RPCClient) GetBlockByHash(hash string) (*GetBlockReply, error)
- func (r *RPCClient) GetBlockByHeight(height int64) (*GetBlockReply, error)
- func (r *RPCClient) GetGasPrice() (int64, error)
- func (r *RPCClient) GetPeerCount() (int64, error)
- func (r *RPCClient) GetPendingBlock() (*GetBlockReplyPart, error)
- func (r *RPCClient) GetTxReceipt(hash string) (*TxReceipt, error)
- func (r *RPCClient) GetUncleByBlockNumberAndIndex(height int64, index int) (*GetBlockReply, error)
- func (r *RPCClient) GetWork() ([]string, 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) SubmitBlock(params []string) (bool, error)
- type RPCStratumClient
- func (r *RPCStratumClient) Check() bool
- func (r *RPCStratumClient) HandleRead() (response string, err error)
- func (r *RPCStratumClient) SendTransaction(from, to, gas, gasPrice, value string, autoGas bool) (string, error)
- func (r *RPCStratumClient) Sick() bool
- func (r *RPCStratumClient) StratumGetBalance(address string) (*big.Int, error)
- func (r *RPCStratumClient) StratumGetBlockByHash(hash string) (*GetBlockReply, error)
- func (r *RPCStratumClient) StratumGetBlockByHeight(height int64) (*GetBlockReply, error)
- func (r *RPCStratumClient) StratumGetGasPrice() (int64, error)
- func (r *RPCStratumClient) StratumGetPeerCount() (int64, error)
- func (r *RPCStratumClient) StratumGetPendingBlock() (*GetBlockReplyPart, error)
- func (r *RPCStratumClient) StratumGetTxReceipt(hash string) (*TxReceipt, error)
- func (r *RPCStratumClient) StratumGetUncleByBlockNumberAndIndex(height int64, index int) (*GetBlockReply, error)
- func (r *RPCStratumClient) StratumGetWork() ([]string, error)
- func (r *RPCStratumClient) StratumRequest(data string) (string, error)
- func (r *RPCStratumClient) StratumSign(from string, s string) (string, error)
- func (r *RPCStratumClient) StratumSubmitBlock(params []string) (uint8, []string, error)
- func (r *RPCStratumClient) StratumSubmitLogin(params []string) (string, error)
- func (r *RPCStratumClient) StratumgetBlockBy(method string, params []interface{}) (*GetBlockReply, error)
- type StratumReq
- type StratumRes
- type StratumRes_2
- type Tx
- type TxReceipt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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"` GasLimit string `json:"gasLimit"` GasUsed string `json:"gasUsed"` Transactions []Tx `json:"transactions"` Uncles []string `json:"uncles"` // 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) GetBlockByHash ¶
func (r *RPCClient) GetBlockByHash(hash string) (*GetBlockReply, error)
func (*RPCClient) GetBlockByHeight ¶
func (r *RPCClient) GetBlockByHeight(height int64) (*GetBlockReply, error)
func (*RPCClient) GetGasPrice ¶
func (*RPCClient) GetPeerCount ¶
func (*RPCClient) GetPendingBlock ¶
func (r *RPCClient) GetPendingBlock() (*GetBlockReplyPart, error)
func (*RPCClient) GetUncleByBlockNumberAndIndex ¶
func (r *RPCClient) GetUncleByBlockNumberAndIndex(height int64, index int) (*GetBlockReply, error)
func (*RPCClient) SendTransaction ¶
type RPCStratumClient ¶
type RPCStratumClient struct { sync.RWMutex Url string Host string Port int Name string // contains filtered or unexported fields }
func NewRPCStratumClient ¶
func (*RPCStratumClient) Check ¶
func (r *RPCStratumClient) Check() bool
func (*RPCStratumClient) HandleRead ¶
func (r *RPCStratumClient) HandleRead() (response string, err error)
func (*RPCStratumClient) SendTransaction ¶
func (r *RPCStratumClient) SendTransaction(from, to, gas, gasPrice, value string, autoGas bool) (string, error)
func (*RPCStratumClient) Sick ¶
func (r *RPCStratumClient) Sick() bool
func (*RPCStratumClient) StratumGetBalance ¶
func (r *RPCStratumClient) StratumGetBalance(address string) (*big.Int, error)
func (*RPCStratumClient) StratumGetBlockByHash ¶
func (r *RPCStratumClient) StratumGetBlockByHash(hash string) (*GetBlockReply, error)
func (*RPCStratumClient) StratumGetBlockByHeight ¶
func (r *RPCStratumClient) StratumGetBlockByHeight(height int64) (*GetBlockReply, error)
func (*RPCStratumClient) StratumGetGasPrice ¶
func (r *RPCStratumClient) StratumGetGasPrice() (int64, error)
func (*RPCStratumClient) StratumGetPeerCount ¶
func (r *RPCStratumClient) StratumGetPeerCount() (int64, error)
func (*RPCStratumClient) StratumGetPendingBlock ¶
func (r *RPCStratumClient) StratumGetPendingBlock() (*GetBlockReplyPart, error)
func (*RPCStratumClient) StratumGetTxReceipt ¶
func (r *RPCStratumClient) StratumGetTxReceipt(hash string) (*TxReceipt, error)
func (*RPCStratumClient) StratumGetUncleByBlockNumberAndIndex ¶
func (r *RPCStratumClient) StratumGetUncleByBlockNumberAndIndex(height int64, index int) (*GetBlockReply, error)
func (*RPCStratumClient) StratumGetWork ¶
func (r *RPCStratumClient) StratumGetWork() ([]string, error)
func (*RPCStratumClient) StratumRequest ¶
func (r *RPCStratumClient) StratumRequest(data string) (string, error)
func (*RPCStratumClient) StratumSign ¶
func (r *RPCStratumClient) StratumSign(from string, s string) (string, error)
func (*RPCStratumClient) StratumSubmitBlock ¶
func (r *RPCStratumClient) StratumSubmitBlock(params []string) (uint8, []string, error)
func (*RPCStratumClient) StratumSubmitLogin ¶
func (r *RPCStratumClient) StratumSubmitLogin(params []string) (string, error)
func (*RPCStratumClient) StratumgetBlockBy ¶
func (r *RPCStratumClient) StratumgetBlockBy(method string, params []interface{}) (*GetBlockReply, error)
type StratumReq ¶
type StratumReq struct { Id json.RawMessage `json:"id"` Method string `json:"method"` Params json.RawMessage `json:"params"` //Params []string `json:"params"` Worker string `json:"worker"` }
type StratumRes ¶
type StratumRes_2 ¶
type StratumRes_2 struct { Id int64 `json:"id"` Version string `json:"jsonrpc"` //Result interface{} `json:"result"` Result bool `json:"result"` }
Used for the first login
Click to show internal directories.
Click to hide internal directories.