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 JSONRPC ¶ added in v0.9.17
JSONRPC returns a handler that implements the Ethereum JSON-RPC API.
func NewDecodeParamError ¶ added in v0.9.17
func NewHashesRes ¶ added in v0.9.17
func NewValidationError ¶ added in v0.9.17
func RpcResponse ¶ added in v0.9.17
func RpcResponse(api *EthereumApi, request *RpcRequest) *interface{}
Types ¶
type BlockFilterArgs ¶ added in v0.9.17
type BlockFilterArgs struct { Earliest int64 Latest int64 Address []string Topics [][]string Skip int Max int }
func (*BlockFilterArgs) UnmarshalJSON ¶ added in v0.9.17
func (args *BlockFilterArgs) UnmarshalJSON(b []byte) (err error)
type BlockNumArg ¶ added in v0.9.17
type BlockNumArg struct {
BlockNumber int64
}
func (*BlockNumArg) UnmarshalJSON ¶ added in v0.9.17
func (args *BlockNumArg) UnmarshalJSON(b []byte) (err error)
type BlockNumIndexArgs ¶ added in v0.9.17
func (*BlockNumIndexArgs) UnmarshalJSON ¶ added in v0.9.17
func (args *BlockNumIndexArgs) UnmarshalJSON(b []byte) (err error)
type BlockRes ¶ added in v0.9.17
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 ¶ added in v0.9.17
type CallArgs ¶ added in v0.9.17
type CallArgs struct { From string To string Value *big.Int Gas *big.Int GasPrice *big.Int Data string BlockNumber int64 }
func (*CallArgs) UnmarshalJSON ¶ added in v0.9.17
type CompileArgs ¶ added in v0.9.17
type CompileArgs struct {
Source string
}
func (*CompileArgs) UnmarshalJSON ¶ added in v0.9.17
func (args *CompileArgs) UnmarshalJSON(b []byte) (err error)
type DbArgs ¶ added in v0.9.17
func (*DbArgs) UnmarshalJSON ¶ added in v0.9.17
type DbHexArgs ¶ added in v0.9.17
func (*DbHexArgs) UnmarshalJSON ¶ added in v0.9.17
type DecodeParamError ¶ added in v0.9.17
type DecodeParamError struct {
// contains filtered or unexported fields
}
func (*DecodeParamError) Error ¶ added in v0.9.17
func (e *DecodeParamError) Error() string
type EthereumApi ¶
type EthereumApi struct {
// contains filtered or unexported fields
}
func NewEthereumApi ¶ added in v0.9.17
func NewEthereumApi(xeth *xeth.XEth) *EthereumApi
func (*EthereumApi) GetRequestReply ¶ added in v0.9.17
func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error
type FilterIdArgs ¶ added in v0.9.17
type FilterIdArgs struct {
Id int
}
func (*FilterIdArgs) UnmarshalJSON ¶ added in v0.9.17
func (args *FilterIdArgs) UnmarshalJSON(b []byte) (err error)
type FilterStringArgs ¶ added in v0.9.17
type FilterStringArgs struct {
Word string
}
func (*FilterStringArgs) UnmarshalJSON ¶ added in v0.9.17
func (args *FilterStringArgs) UnmarshalJSON(b []byte) (err error)
type GetBalanceArgs ¶
func (*GetBalanceArgs) UnmarshalJSON ¶ added in v0.9.17
func (args *GetBalanceArgs) UnmarshalJSON(b []byte) (err error)
type GetBlockByHashArgs ¶ added in v0.9.17
func (*GetBlockByHashArgs) UnmarshalJSON ¶ added in v0.9.17
func (args *GetBlockByHashArgs) UnmarshalJSON(b []byte) (err error)
type GetBlockByNumberArgs ¶ added in v0.9.17
func (*GetBlockByNumberArgs) UnmarshalJSON ¶ added in v0.9.17
func (args *GetBlockByNumberArgs) UnmarshalJSON(b []byte) (err error)
type GetDataArgs ¶ added in v0.9.17
func (*GetDataArgs) UnmarshalJSON ¶ added in v0.9.17
func (args *GetDataArgs) UnmarshalJSON(b []byte) (err error)
type GetStorageArgs ¶
func (*GetStorageArgs) UnmarshalJSON ¶ added in v0.9.17
func (args *GetStorageArgs) UnmarshalJSON(b []byte) (err error)
type GetStorageAtArgs ¶ added in v0.9.17
func (*GetStorageAtArgs) UnmarshalJSON ¶ added in v0.9.17
func (args *GetStorageAtArgs) UnmarshalJSON(b []byte) (err error)
type GetTxCountArgs ¶
func (*GetTxCountArgs) UnmarshalJSON ¶ added in v0.9.17
func (args *GetTxCountArgs) UnmarshalJSON(b []byte) (err error)
type HashArgs ¶ added in v0.9.17
type HashArgs struct {
Hash string
}
func (*HashArgs) UnmarshalJSON ¶ added in v0.9.17
type HashIndexArgs ¶ added in v0.9.17
func (*HashIndexArgs) UnmarshalJSON ¶ added in v0.9.17
func (args *HashIndexArgs) UnmarshalJSON(b []byte) (err error)
type InsufficientParamsError ¶ added in v0.9.17
type InsufficientParamsError struct {
// contains filtered or unexported fields
}
func NewInsufficientParamsError ¶ added in v0.9.17
func NewInsufficientParamsError(have int, want int) *InsufficientParamsError
func (*InsufficientParamsError) Error ¶ added in v0.9.17
func (e *InsufficientParamsError) Error() string
type InvalidTypeError ¶ added in v0.9.17
type InvalidTypeError struct {
// contains filtered or unexported fields
}
func NewInvalidTypeError ¶ added in v0.9.17
func NewInvalidTypeError(method, msg string) *InvalidTypeError
func (*InvalidTypeError) Error ¶ added in v0.9.17
func (e *InvalidTypeError) Error() string
type LogRes ¶ added in v0.9.17
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 ¶ added in v0.9.17
type NewSigArgs ¶ added in v0.9.20
func (*NewSigArgs) UnmarshalJSON ¶ added in v0.9.20
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 ¶ added in v0.9.17
type NotAvailableError ¶ added in v0.9.20
func NewNotAvailableError ¶ added in v0.9.20
func NewNotAvailableError(method string, reason string) *NotAvailableError
func (*NotAvailableError) Error ¶ added in v0.9.20
func (e *NotAvailableError) Error() string
type NotImplementedError ¶ added in v0.9.17
type NotImplementedError struct {
Method string
}
func NewNotImplementedError ¶ added in v0.9.17
func NewNotImplementedError(method string) *NotImplementedError
func (*NotImplementedError) Error ¶ added in v0.9.17
func (e *NotImplementedError) Error() string
type RpcErrorObject ¶ added in v0.9.17
type RpcErrorResponse ¶ added in v0.9.17
type RpcErrorResponse struct { Id interface{} `json:"id"` Jsonrpc string `json:"jsonrpc"` Error *RpcErrorObject `json:"error"` }
type RpcRequest ¶ added in v0.9.17
type RpcRequest struct { Id interface{} `json:"id"` Jsonrpc string `json:"jsonrpc"` Method string `json:"method"` Params json.RawMessage `json:"params"` }
type RpcSuccessResponse ¶ added in v0.9.17
type RpcSuccessResponse struct { Id interface{} `json:"id"` Jsonrpc string `json:"jsonrpc"` Result interface{} `json:"result"` }
type Sha3Args ¶ added in v0.9.17
type Sha3Args struct {
Data string
}
func (*Sha3Args) UnmarshalJSON ¶ added in v0.9.17
type SourceArgs ¶ added in v0.9.17
type SourceArgs struct {
Source string
}
func (*SourceArgs) UnmarshalJSON ¶ added in v0.9.17
func (args *SourceArgs) UnmarshalJSON(b []byte) (err error)
type SubmitWorkArgs ¶ added in v0.9.17
func (*SubmitWorkArgs) UnmarshalJSON ¶ added in v0.9.17
func (args *SubmitWorkArgs) UnmarshalJSON(b []byte) (err error)
type TransactionRes ¶ added in v0.9.17
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 ¶ added in v0.9.17
func NewTransactionRes(tx *types.Transaction) *TransactionRes
type UncleRes ¶ added in v0.9.17
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 ¶ added in v0.9.17
type ValidationError ¶ added in v0.9.17
type ValidationError struct { ParamName string // contains filtered or unexported fields }
func (*ValidationError) Error ¶ added in v0.9.17
func (e *ValidationError) Error() string
type WhisperFilterArgs ¶ added in v0.9.17
func (*WhisperFilterArgs) UnmarshalJSON ¶ added in v0.9.17
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 ¶ added in v0.9.17
type WhisperIdentityArgs struct {
Identity string
}
func (*WhisperIdentityArgs) UnmarshalJSON ¶ added in v0.9.17
func (args *WhisperIdentityArgs) UnmarshalJSON(b []byte) (err error)
type WhisperMessageArgs ¶ added in v0.9.17
type WhisperMessageArgs struct { Payload string To string From string Topics []string Priority uint32 Ttl uint32 }
func (*WhisperMessageArgs) UnmarshalJSON ¶ added in v0.9.17
func (args *WhisperMessageArgs) UnmarshalJSON(b []byte) (err error)