Documentation ¶
Overview ¶
This file is part of go-ethereum
go-ethereum is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
go-ethereum is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
Index ¶
- func JSONRPC(pipe *xeth.XEth) http.Handler
- func NewDecodeParamError(errstr string) error
- func NewHashesRes(hs []common.Hash) []string
- func NewValidationError(param string, msg string) error
- func RpcResponse(api *EthereumApi, request *RpcRequest) *interface{}
- func Start(pipe *xeth.XEth, config RpcConfig) error
- func Stop() error
- type BlockFilterArgs
- type BlockNumArg
- type BlockNumIndexArgs
- type BlockRes
- type CallArgs
- type CompileArgs
- type DbArgs
- type DbHexArgs
- type DecodeParamError
- type EthereumApi
- type FilterIdArgs
- type FilterStringArgs
- type GetBalanceArgs
- type GetBlockByHashArgs
- type GetBlockByNumberArgs
- type GetDataArgs
- type GetStorageArgs
- type GetStorageAtArgs
- type GetTxCountArgs
- type HashArgs
- type HashIndexArgs
- type InsufficientParamsError
- type InvalidTypeError
- type Jeth
- type LogRes
- type NewSigArgs
- type NewTxArgs
- type NotAvailableError
- type NotImplementedError
- type RpcConfig
- type RpcErrorObject
- type RpcErrorResponse
- type RpcRequest
- type RpcSuccessResponse
- type Sha3Args
- type SourceArgs
- type SubmitWorkArgs
- type TransactionRes
- type UncleRes
- type ValidationError
- type WhisperFilterArgs
- type WhisperIdentityArgs
- type WhisperMessageArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDecodeParamError ¶
func NewHashesRes ¶
func NewValidationError ¶
func RpcResponse ¶
func RpcResponse(api *EthereumApi, request *RpcRequest) *interface{}
Types ¶
type BlockFilterArgs ¶
type BlockFilterArgs struct { Earliest int64 Latest int64 Address []string Topics [][]string Skip int Max int }
func (*BlockFilterArgs) UnmarshalJSON ¶
func (args *BlockFilterArgs) UnmarshalJSON(b []byte) (err error)
type BlockNumArg ¶
type BlockNumArg struct {
BlockNumber int64
}
func (*BlockNumArg) UnmarshalJSON ¶
func (args *BlockNumArg) UnmarshalJSON(b []byte) (err error)
type BlockNumIndexArgs ¶
func (*BlockNumIndexArgs) UnmarshalJSON ¶
func (args *BlockNumIndexArgs) UnmarshalJSON(b []byte) (err error)
type BlockRes ¶
type BlockRes struct { BlockNumber *hexnum `json:"number"` BlockHash *hexdata `json:"hash"` ParentHash *hexdata `json:"parentHash"` Nonce *hexdata `json:"nonce"` Sha3Uncles *hexdata `json:"sha3Uncles"` LogsBloom *hexdata `json:"logsBloom"` TransactionRoot *hexdata `json:"transactionsRoot"` StateRoot *hexdata `json:"stateRoot"` Miner *hexdata `json:"miner"` Difficulty *hexnum `json:"difficulty"` TotalDifficulty *hexnum `json:"totalDifficulty"` Size *hexnum `json:"size"` ExtraData *hexdata `json:"extraData"` GasLimit *hexnum `json:"gasLimit"` GasUsed *hexnum `json:"gasUsed"` UnixTimestamp *hexnum `json:"timestamp"` Transactions []*TransactionRes `json:"transactions"` Uncles []*UncleRes `json:"uncles"` // contains filtered or unexported fields }
func (*BlockRes) MarshalJSON ¶
type CallArgs ¶
type CallArgs struct { From string To string Value *big.Int Gas *big.Int GasPrice *big.Int Data string BlockNumber int64 }
func (*CallArgs) UnmarshalJSON ¶
type CompileArgs ¶
type CompileArgs struct {
Source string
}
func (*CompileArgs) UnmarshalJSON ¶
func (args *CompileArgs) UnmarshalJSON(b []byte) (err error)
type DbArgs ¶
func (*DbArgs) UnmarshalJSON ¶
type DbHexArgs ¶
func (*DbHexArgs) UnmarshalJSON ¶
type DecodeParamError ¶
type DecodeParamError struct {
// contains filtered or unexported fields
}
func (*DecodeParamError) Error ¶
func (e *DecodeParamError) Error() string
type EthereumApi ¶
type EthereumApi struct {
// contains filtered or unexported fields
}
func NewEthereumApi ¶
func NewEthereumApi(xeth *xeth.XEth) *EthereumApi
func (*EthereumApi) GetRequestReply ¶
func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error
type FilterIdArgs ¶
type FilterIdArgs struct {
Id int
}
func (*FilterIdArgs) UnmarshalJSON ¶
func (args *FilterIdArgs) UnmarshalJSON(b []byte) (err error)
type FilterStringArgs ¶
type FilterStringArgs struct {
Word string
}
func (*FilterStringArgs) UnmarshalJSON ¶
func (args *FilterStringArgs) UnmarshalJSON(b []byte) (err error)
type GetBalanceArgs ¶
func (*GetBalanceArgs) UnmarshalJSON ¶
func (args *GetBalanceArgs) UnmarshalJSON(b []byte) (err error)
type GetBlockByHashArgs ¶
func (*GetBlockByHashArgs) UnmarshalJSON ¶
func (args *GetBlockByHashArgs) UnmarshalJSON(b []byte) (err error)
type GetBlockByNumberArgs ¶
func (*GetBlockByNumberArgs) UnmarshalJSON ¶
func (args *GetBlockByNumberArgs) UnmarshalJSON(b []byte) (err error)
type GetDataArgs ¶
func (*GetDataArgs) UnmarshalJSON ¶
func (args *GetDataArgs) UnmarshalJSON(b []byte) (err error)
type GetStorageArgs ¶
func (*GetStorageArgs) UnmarshalJSON ¶
func (args *GetStorageArgs) UnmarshalJSON(b []byte) (err error)
type GetStorageAtArgs ¶
func (*GetStorageAtArgs) UnmarshalJSON ¶
func (args *GetStorageAtArgs) UnmarshalJSON(b []byte) (err error)
type GetTxCountArgs ¶
func (*GetTxCountArgs) UnmarshalJSON ¶
func (args *GetTxCountArgs) UnmarshalJSON(b []byte) (err error)
type HashIndexArgs ¶
func (*HashIndexArgs) UnmarshalJSON ¶
func (args *HashIndexArgs) UnmarshalJSON(b []byte) (err error)
type InsufficientParamsError ¶
type InsufficientParamsError struct {
// contains filtered or unexported fields
}
func NewInsufficientParamsError ¶
func NewInsufficientParamsError(have int, want int) *InsufficientParamsError
func (*InsufficientParamsError) Error ¶
func (e *InsufficientParamsError) Error() string
type InvalidTypeError ¶
type InvalidTypeError struct {
// contains filtered or unexported fields
}
func NewInvalidTypeError ¶
func NewInvalidTypeError(method, msg string) *InvalidTypeError
func (*InvalidTypeError) Error ¶
func (e *InvalidTypeError) Error() string
type LogRes ¶
type LogRes struct { Address *hexdata `json:"address"` Topics []*hexdata `json:"topics"` Data *hexdata `json:"data"` BlockNumber *hexnum `json:"blockNumber"` LogIndex *hexnum `json:"logIndex"` BlockHash *hexdata `json:"blockHash"` TransactionHash *hexdata `json:"transactionHash"` TransactionIndex *hexnum `json:"transactionIndex"` }
func NewLogsRes ¶
type NewSigArgs ¶
func (*NewSigArgs) UnmarshalJSON ¶
func (args *NewSigArgs) UnmarshalJSON(b []byte) (err error)
type NewTxArgs ¶
type NewTxArgs struct { From string To string Nonce *big.Int Value *big.Int Gas *big.Int GasPrice *big.Int Data string BlockNumber int64 }
func (*NewTxArgs) UnmarshalJSON ¶
type NotAvailableError ¶
func NewNotAvailableError ¶
func NewNotAvailableError(method string, reason string) *NotAvailableError
func (*NotAvailableError) Error ¶
func (e *NotAvailableError) Error() string
type NotImplementedError ¶
type NotImplementedError struct {
Method string
}
func NewNotImplementedError ¶
func NewNotImplementedError(method string) *NotImplementedError
func (*NotImplementedError) Error ¶
func (e *NotImplementedError) Error() string
type RpcErrorObject ¶
type RpcErrorResponse ¶
type RpcErrorResponse struct { Id interface{} `json:"id"` Jsonrpc string `json:"jsonrpc"` Error *RpcErrorObject `json:"error"` }
type RpcRequest ¶
type RpcRequest struct { Id interface{} `json:"id"` Jsonrpc string `json:"jsonrpc"` Method string `json:"method"` Params json.RawMessage `json:"params"` }
type RpcSuccessResponse ¶
type RpcSuccessResponse struct { Id interface{} `json:"id"` Jsonrpc string `json:"jsonrpc"` Result interface{} `json:"result"` }
type SourceArgs ¶
type SourceArgs struct {
Source string
}
func (*SourceArgs) UnmarshalJSON ¶
func (args *SourceArgs) UnmarshalJSON(b []byte) (err error)
type SubmitWorkArgs ¶
func (*SubmitWorkArgs) UnmarshalJSON ¶
func (args *SubmitWorkArgs) UnmarshalJSON(b []byte) (err error)
type TransactionRes ¶
type TransactionRes struct { Hash *hexdata `json:"hash"` Nonce *hexnum `json:"nonce"` BlockHash *hexdata `json:"blockHash"` BlockNumber *hexnum `json:"blockNumber"` TxIndex *hexnum `json:"transactionIndex"` From *hexdata `json:"from"` To *hexdata `json:"to"` Value *hexnum `json:"value"` Gas *hexnum `json:"gas"` GasPrice *hexnum `json:"gasPrice"` Input *hexdata `json:"input"` }
func NewTransactionRes ¶
func NewTransactionRes(tx *types.Transaction) *TransactionRes
type UncleRes ¶
type UncleRes struct { BlockNumber *hexnum `json:"number"` BlockHash *hexdata `json:"hash"` ParentHash *hexdata `json:"parentHash"` Nonce *hexdata `json:"nonce"` Sha3Uncles *hexdata `json:"sha3Uncles"` ReceiptHash *hexdata `json:"receiptHash"` LogsBloom *hexdata `json:"logsBloom"` TransactionRoot *hexdata `json:"transactionsRoot"` StateRoot *hexdata `json:"stateRoot"` Miner *hexdata `json:"miner"` Difficulty *hexnum `json:"difficulty"` ExtraData *hexdata `json:"extraData"` GasLimit *hexnum `json:"gasLimit"` GasUsed *hexnum `json:"gasUsed"` UnixTimestamp *hexnum `json:"timestamp"` }
func NewUncleRes ¶
type ValidationError ¶
type ValidationError struct { ParamName string // contains filtered or unexported fields }
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
type WhisperFilterArgs ¶
func (*WhisperFilterArgs) UnmarshalJSON ¶
func (args *WhisperFilterArgs) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements the json.Unmarshaler interface, invoked to convert a JSON message blob into a WhisperFilterArgs structure.
type WhisperIdentityArgs ¶
type WhisperIdentityArgs struct {
Identity string
}
func (*WhisperIdentityArgs) UnmarshalJSON ¶
func (args *WhisperIdentityArgs) UnmarshalJSON(b []byte) (err error)
type WhisperMessageArgs ¶
type WhisperMessageArgs struct { Payload string To string From string Topics []string Priority uint32 Ttl uint32 }
func (*WhisperMessageArgs) UnmarshalJSON ¶
func (args *WhisperMessageArgs) UnmarshalJSON(b []byte) (err error)