Documentation ¶
Index ¶
- type Block
- type Error
- type RequestResult
- func (pointer *RequestResult) ToBigInt() (*big.Int, error)
- func (pointer *RequestResult) ToBlock() (*Block, error)
- func (pointer *RequestResult) ToBoolean() (bool, error)
- func (pointer *RequestResult) ToComplexIntResponse() (types.ComplexIntResponse, error)
- func (pointer *RequestResult) ToComplexString() (types.ComplexString, error)
- func (pointer *RequestResult) ToInt() (int64, error)
- func (pointer *RequestResult) ToSignTransactionResponse() (*SignTransactionResponse, error)
- func (pointer *RequestResult) ToString() (string, error)
- func (pointer *RequestResult) ToStringArray() ([]string, error)
- func (pointer *RequestResult) ToSyncingResponse() (*SyncingResponse, error)
- func (pointer *RequestResult) ToTransactionReceipt() (*TransactionReceipt, error)
- func (pointer *RequestResult) ToTransactionResponse() (*TransactionResponse, error)
- type RequestTransactionParameters
- type SHHPostParameters
- type SignTransactionResponse
- type SignedTransactionParams
- type SyncingResponse
- type TransactionLogs
- type TransactionParameters
- type TransactionReceipt
- type TransactionResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct { Number *big.Int `json:"number"` Hash string `json:"hash"` ParentHash string `json:"parentHash"` Author string `json:"author,omitempty"` Miner string `json:"miner,omitempty"` Size *big.Int `json:"size"` GasUsed *big.Int `json:"gasUsed"` Nonce *big.Int `json:"nonce"` Timestamp *big.Int `json:"timestamp"` }
func (*Block) UnmarshalJSON ¶
*
- How to un-marshal the block struct using the Big.Int rather than the
- `complexReturn` type.
type RequestResult ¶
type RequestResult struct { ID int `json:"id"` Version string `json:"jsonrpc"` Result interface{} `json:"result"` Error *Error `json:"error,omitempty"` Data string `json:"data,omitempty"` }
func (*RequestResult) ToBlock ¶
func (pointer *RequestResult) ToBlock() (*Block, error)
func (*RequestResult) ToBoolean ¶
func (pointer *RequestResult) ToBoolean() (bool, error)
func (*RequestResult) ToComplexIntResponse ¶
func (pointer *RequestResult) ToComplexIntResponse() (types.ComplexIntResponse, error)
func (*RequestResult) ToComplexString ¶
func (pointer *RequestResult) ToComplexString() (types.ComplexString, error)
func (*RequestResult) ToInt ¶
func (pointer *RequestResult) ToInt() (int64, error)
func (*RequestResult) ToSignTransactionResponse ¶
func (pointer *RequestResult) ToSignTransactionResponse() (*SignTransactionResponse, error)
func (*RequestResult) ToString ¶
func (pointer *RequestResult) ToString() (string, error)
func (*RequestResult) ToStringArray ¶
func (pointer *RequestResult) ToStringArray() ([]string, error)
func (*RequestResult) ToSyncingResponse ¶
func (pointer *RequestResult) ToSyncingResponse() (*SyncingResponse, error)
func (*RequestResult) ToTransactionReceipt ¶
func (pointer *RequestResult) ToTransactionReceipt() (*TransactionReceipt, error)
func (*RequestResult) ToTransactionResponse ¶
func (pointer *RequestResult) ToTransactionResponse() (*TransactionResponse, error)
type RequestTransactionParameters ¶
type RequestTransactionParameters struct { From string `json:"from"` To string `json:"to,omitempty"` Nonce string `json:"nonce,omitempty"` Gas string `json:"gas,omitempty"` GasPrice string `json:"gasPrice,omitempty"` Value string `json:"value,omitempty"` Data string `json:"data,omitempty"` }
RequestTransactionParameters JSON
type SHHPostParameters ¶
type SignTransactionResponse ¶
type SignTransactionResponse struct { Raw types.ComplexString `json:"raw"` Transaction SignedTransactionParams `json:"tx"` }
type SignedTransactionParams ¶
type SignedTransactionParams struct { Gas *big.Int `json:gas` GasPrice *big.Int `json:gasPrice` Hash string `json:hash` Input string `json:input` Nonce *big.Int `json:nonce` S string `json:s` R string `json:r` V *big.Int `json:v` To string `json:to` Value *big.Int `json:value` }
func (*SignedTransactionParams) UnmarshalJSON ¶
func (sp *SignedTransactionParams) UnmarshalJSON(data []byte) error
type SyncingResponse ¶
type TransactionLogs ¶
type TransactionLogs struct { Address string `json:"address"` Topics []string `json:"topics"` Data string `json:"data"` BlockNumber *big.Int `json:"blockNumber"` TransactionHash string `json:"transactionHash"` TransactionIndex *big.Int `json:"transactionIndex"` BlockHash string `json:"blockHash"` LogIndex *big.Int `json:"logIndex"` Removed bool `json:"removed"` }
func (*TransactionLogs) UnmarshalJSON ¶
func (r *TransactionLogs) UnmarshalJSON(data []byte) error
type TransactionParameters ¶
type TransactionParameters struct { From string To string Nonce *big.Int Gas *big.Int GasPrice *big.Int Value *big.Int Data types.ComplexString }
TransactionParameters GO transaction to make more easy controll the parameters
func (*TransactionParameters) Transform ¶
func (params *TransactionParameters) Transform() *RequestTransactionParameters
Transform the GO transactions parameters to json style
type TransactionReceipt ¶
type TransactionReceipt struct { TransactionHash string `json:"transactionHash"` TransactionIndex *big.Int `json:"transactionIndex"` BlockHash string `json:"blockHash"` BlockNumber *big.Int `json:"blockNumber"` From string `json:"from"` To string `json:"to"` CumulativeGasUsed *big.Int `json:"cumulativeGasUsed"` GasUsed *big.Int `json:"gasUsed"` ContractAddress string `json:"contractAddress"` Logs []TransactionLogs `json:"logs"` LogsBloom string `json:"logsBloom"` Root string `json:"string"` Status bool `json:"status"` }
func (*TransactionReceipt) UnmarshalJSON ¶
func (r *TransactionReceipt) UnmarshalJSON(data []byte) error
type TransactionResponse ¶
type TransactionResponse struct { Hash string `json:"hash"` Nonce *big.Int `json:"nonce"` BlockHash string `json:"blockHash"` BlockNumber *big.Int `json:"blockNumber"` TransactionIndex *big.Int `json:"transactionIndex"` From string `json:"from"` To string `json:"to"` Input string `json:"input"` Value *big.Int `json:"value"` GasPrice *big.Int `json:"gasPrice,omitempty"` Gas *big.Int `json:"gas,omitempty"` Data types.ComplexString `json:"data,omitempty"` }
func (*TransactionResponse) UnmarshalJSON ¶
func (t *TransactionResponse) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.