Documentation ¶
Index ¶
- Constants
- Variables
- func AdminAddPeer(url string) (interface{}, error)
- func AdminDatadir() (interface{}, error)
- func AdminNodeInfo() (interface{}, error)
- func AdminPeers() (interface{}, error)
- func AdminSetSolc(path string) (interface{}, error)
- func AdminStartRPC(host string, port int64, cors string, apis string) (interface{}, error)
- func AdminStartWS(host string, port int64, cors string, apis string) (interface{}, error)
- func AdminStopRPC() (interface{}, error)
- func AdminStopWS() (interface{}, error)
- func CallRest(url string, dst interface{}) error
- func DBGetHex(data []string) (string, error)
- func DBGetString(data []string) (string, error)
- func DBPutHex(data []string) (bool, error)
- func DBPutString(data []string) (bool, error)
- func DataToHex(data string) ([]byte, error)
- func DebugBacktraceAt(location string) (interface{}, error)
- func DebugBlockProfile(file string, seconds int64) (interface{}, error)
- func DebugCPUProfile(file string, seconds int64) (interface{}, error)
- func DebugDumpBlock(number uint64) (interface{}, error)
- func DebugGCStats() (interface{}, error)
- func DebugGetBlockRLP(number uint64) (interface{}, error)
- func DebugGoTrace(file string, seconds int64) (interface{}, error)
- func DebugMemStats() (interface{}, error)
- func DebugSeedHash(number uint64) (interface{}, error)
- func DebugSetBlockProfileRate(rate int64) (interface{}, error)
- func DebugSetHead(number uint64) (interface{}, error)
- func DebugStacks() (interface{}, error)
- func DebugStartCPUProfile(file string) (interface{}, error)
- func DebugStartGoTrace(file string) (interface{}, error)
- func DebugStopCPUProfile() (interface{}, error)
- func DebugStopGoTrace() (interface{}, error)
- func DebugTraceBlock(blockRlp string) (interface{}, error)
- func DebugTraceBlockByHash(hash string) (interface{}, error)
- func DebugTraceBlockByNumber(number uint64) (interface{}, error)
- func DebugTraceBlockFromFile(file string) (interface{}, error)
- func DebugTraceTransaction(txHash string) (interface{}, error)
- func DebugVModule(pattern string) (interface{}, error)
- func DebugVerbosity(number int64) (interface{}, error)
- func DebugWriteBlockProfile(file string) (interface{}, error)
- func DebugWriteMemProfile(file string) (interface{}, error)
- func EncodeJSON(data interface{}) ([]byte, error)
- func EncodeJSONString(data interface{}) (string, error)
- func EncodeJSONToBuffer(data interface{}, b *bytes.Buffer) error
- func EthAccounts() ([]string, error)
- func EthBlockNumber() (int64, error)
- func EthCall(tx *TransactionObject, blockNumberOrTag string) (string, error)
- func EthCoinbase() (string, error)
- func EthCompileLLL(sourceCode string) (string, error)
- func EthCompileSerpent(sourceCode string) (string, error)
- func EthCompileSolidity(sourceCode string) (string, error)
- func EthEstimateGas(tx *TransactionObject, blockNumberOrTag string) (int64, error)
- func EthGasPrice() (int64, error)
- func EthGetBalance(address string, blockNumberOrTag string) (int64, error)
- func EthGetBlockTransactionCountByHash(blockHash string) (int64, error)
- func EthGetBlockTransactionCountByNumber(blockNumberOrTag string) (int64, error)
- func EthGetCode(address, blockNumberOrTag string) (string, error)
- func EthGetCompilers() ([]string, error)
- func EthGetStorageAt(address, positionInTheStorage, blockNumberOrTag string) (string, error)
- func EthGetTransactionCount(address, blockNumberOrTag string) (int64, error)
- func EthGetUncleCountByBlockHash(blockHash string) (int64, error)
- func EthGetUncleCountByBlockNumber(blockNumberOrTag string) (int64, error)
- func EthGetWork() ([]string, error)
- func EthHashrate() (int64, error)
- func EthMining() (bool, error)
- func EthNewBlockFilter() (int64, error)
- func EthNewFilter(filterOptions *FilterOptions) (int64, error)
- func EthNewPendingTransactionFilter() (int64, error)
- func EthProtocolVersion() (string, error)
- func EthSendRawTransaction(txData string) (string, error)
- func EthSendTransaction(tx *TransactionObject) (string, error)
- func EthSign(address, hashOfDataToSign string) (string, error)
- func EthSubmitHashrate(hashrate []string) (bool, error)
- func EthSubmitWork(work []string) (bool, error)
- func EthUninstallFilter(filterID string) (bool, error)
- func HexToData(b []byte) string
- func HexToDataWithoutPrefix(b []byte) string
- func HexToPaddedData(b []byte) string
- func HexToPaddedDataWithoutPrefix(b []byte) string
- func IntToData(i int64) string
- func IntToQuantity(i int64) string
- func IntToQuantityWithoutPrefix(i int64) string
- func MapToObject(source interface{}, dst interface{}) error
- func MinerHashrate() (interface{}, error)
- func MinerMakeDAG(number int64) (interface{}, error)
- func MinerSetExtra(extra string) (interface{}, error)
- func MinerSetGasPrice(number int64) (interface{}, error)
- func MinerStart(threads int64) (interface{}, error)
- func MinerStartAutoDAG() (interface{}, error)
- func MinerStop() (interface{}, error)
- func MinerStopAutoDAG() (interface{}, error)
- func NetListening() (bool, error)
- func NetVersion() (string, error)
- func ParseQuantity(q string) (int64, error)
- func PersonalImportRawKey(keyData, passphrase string) (interface{}, error)
- func PersonalListAccounts() (interface{}, error)
- func PersonalLockAccount(address string) (interface{}, error)
- func PersonalNewAccount(passphrase string) (interface{}, error)
- func PersonalSendTransaction(tx *TransactionObject, passphrase string) (string, error)
- func PersonalUnlockAccount(address, passphrase string, duration int64) (interface{}, error)
- func QuantityToInt(q string) (int64, error)
- func SSHAddToGroup(identityAddress string) (interface{}, error)
- func SSHHasIdentity(identityAddress string) (bool, error)
- func SSHNewFilter(filter *FilterOptions) (int64, error)
- func SSHNewGroup() (string, error)
- func SSHNewIdentity() (string, error)
- func SSHPost(whisper *WhisperMessage) (bool, error)
- func SSHUninstallFilter(filterID string) (bool, error)
- func SSHVersion() (string, error)
- func SetServer(newServer string)
- func StringToData(str string) string
- func StringToDataWithoutPrefix(str string) string
- func StringToMethodID(method string) string
- func TxPoolContent() (interface{}, error)
- func TxPoolInspect() (interface{}, error)
- func TxPoolStatus() (interface{}, error)
- func Web3ClientVersion() (string, error)
- func Web3Sha3(data string) (string, error)
- type BlockObject
- func EthGetBlockByHash(blockHash string, fullTransaction bool) (*BlockObject, error)
- func EthGetBlockByNumber(blockNumberOrTag string, fullTransaction bool) (*BlockObject, error)
- func EthGetUncleByBlockHashAndIndex(blockHash, uncleIndex string) (*BlockObject, error)
- func EthGetUncleByBlockNumberAndIndex(blockNumberOrTag string, uncleIndex string) (*BlockObject, error)
- type EthSyncingResponse
- type EtherscanResponse
- type EtherscanTransaction
- type FilterOptions
- type JSON2Request
- type JSON2Response
- type JSONError
- type LogObject
- type Message
- type Quantity
- func (q *Quantity) Int64() int64
- func (e *Quantity) JSONBuffer(b *bytes.Buffer) error
- func (e *Quantity) JSONByte() ([]byte, error)
- func (e *Quantity) JSONString() (string, error)
- func (q *Quantity) MarshalText() (text []byte, err error)
- func (e *Quantity) String() string
- func (q *Quantity) UnmarshalText(text []byte) error
- type TransactionObject
- type TransactionReceipt
- type WhisperMessage
Constants ¶
View Source
const Earliest string = "earliest"
Blog tags
View Source
const Latest string = "latest"
View Source
const Pending string = "pending"
Variables ¶
View Source
var EtherscanAPIKeyToken string = "UninitializedApiKey"
View Source
var EtherscanTestNet bool = true
View Source
var EtherscanTestNetName string = "ropsten"
Functions ¶
func AdminStartRPC ¶
TODO: finish
func AdminStartWS ¶
TODO: finish
func DebugBlockProfile ¶
TODO: finish
func DebugCPUProfile ¶
TODO: finish
func DebugSetBlockProfileRate ¶
TODO: finish
func DebugStartCPUProfile ¶
TODO: finish
func DebugTraceBlock ¶
TODO: finish TODO: add config?
func DebugTraceBlockByHash ¶
TODO: finish TODO: add config?
func DebugTraceBlockByNumber ¶
TODO: finish TODO: add config?
func DebugTraceBlockFromFile ¶
TODO: finish TODO: add config?
func DebugTraceTransaction ¶
TODO: finish TODO: add options?
func DebugWriteBlockProfile ¶
TODO: finish
func DebugWriteMemProfile ¶
TODO: finish
func EncodeJSON ¶
func EncodeJSONString ¶
func EncodeJSONToBuffer ¶
func EthAccounts ¶
func EthBlockNumber ¶
func EthCall ¶
func EthCall(tx *TransactionObject, blockNumberOrTag string) (string, error)
TODO: test
func EthCoinbase ¶
func EthEstimateGas ¶
func EthEstimateGas(tx *TransactionObject, blockNumberOrTag string) (int64, error)
TODO: test
func EthGasPrice ¶
func EthGetBalance ¶
TODO: test
func EthGetBlockTransactionCountByHash ¶
TODO: test
func EthGetBlockTransactionCountByNumber ¶
TODO: test
func EthGetCompilers ¶
func EthGetStorageAt ¶
TODO: test
func EthGetTransactionCount ¶
TODO: test
func EthGetUncleCountByBlockHash ¶
TODO: test
func EthGetUncleCountByBlockNumber ¶
TODO: test
func EthHashrate ¶
func EthNewPendingTransactionFilter ¶
TODO: test
func EthProtocolVersion ¶
func HexToDataWithoutPrefix ¶
func HexToPaddedData ¶
func IntToQuantity ¶
func MapToObject ¶
func MapToObject(source interface{}, dst interface{}) error
func NetListening ¶
func NetVersion ¶
func ParseQuantity ¶
func PersonalImportRawKey ¶
TODO: finish
func PersonalLockAccount ¶
TODO: finish
func PersonalNewAccount ¶
TODO: finish
func PersonalSendTransaction ¶
func PersonalSendTransaction(tx *TransactionObject, passphrase string) (string, error)
TODO: finish
func PersonalUnlockAccount ¶
TODO: finish
func QuantityToInt ¶
func StringToData ¶
func StringToMethodID ¶
func Web3ClientVersion ¶
Types ¶
type BlockObject ¶
type BlockObject struct { Number string `json:"number"` Hash string `json:"hash"` ParentHash string `json:"parentHash"` Nonce string `json:"nonce"` Sha3Uncles string `json:"sha3Uncles"` LogsBloom string `json:"logsBloom"` TransactionsRoot string `json:"transactionsRoot"` StateRoot string `json:"stateRoot"` Miner string `json:"miner"` Difficulty string `json:"difficulty"` TotalDifficulty string `json:"totalDifficulty"` ExtraData string `json:"extraData"` Size string `json:"size"` GasLimit string `json:"gasLimit"` GasUsed string `json:"gasUsed"` Timestamp string `json:"timestamp"` //TODO: handle both full transactions and the hashes Transactions []interface{} `json:"transactions"` Uncles []string `json:"uncles"` }
func EthGetBlockByHash ¶
func EthGetBlockByHash(blockHash string, fullTransaction bool) (*BlockObject, error)
TODO: test
func EthGetBlockByNumber ¶
func EthGetBlockByNumber(blockNumberOrTag string, fullTransaction bool) (*BlockObject, error)
TODO: test
func EthGetUncleByBlockHashAndIndex ¶
func EthGetUncleByBlockHashAndIndex(blockHash, uncleIndex string) (*BlockObject, error)
TODO: test
func EthGetUncleByBlockNumberAndIndex ¶
func EthGetUncleByBlockNumberAndIndex(blockNumberOrTag string, uncleIndex string) (*BlockObject, error)
TODO: test
func (*BlockObject) JSONBuffer ¶
func (e *BlockObject) JSONBuffer(b *bytes.Buffer) error
func (*BlockObject) JSONByte ¶
func (e *BlockObject) JSONByte() ([]byte, error)
func (*BlockObject) JSONString ¶
func (e *BlockObject) JSONString() (string, error)
func (*BlockObject) String ¶
func (e *BlockObject) String() string
type EthSyncingResponse ¶
type EthSyncingResponse struct { Syncing bool `json:"syncing,omitempty"` StartingBlock string `json:"startingBlock,omitempty"` CurrentBlock string `json:"currentBlock,omitempty"` HighestBlock string `json:"highestBlock,omitempty"` }
func EthSyncing ¶
func EthSyncing() (*EthSyncingResponse, error)
func (*EthSyncingResponse) JSONBuffer ¶
func (e *EthSyncingResponse) JSONBuffer(b *bytes.Buffer) error
func (*EthSyncingResponse) JSONByte ¶
func (e *EthSyncingResponse) JSONByte() ([]byte, error)
func (*EthSyncingResponse) JSONString ¶
func (e *EthSyncingResponse) JSONString() (string, error)
func (*EthSyncingResponse) String ¶
func (e *EthSyncingResponse) String() string
type EtherscanResponse ¶
type EtherscanTransaction ¶
type EtherscanTransaction struct { BlockNumber string `json:"blockNumber"` TimeStamp string `json:"timeStamp"` Hash string `json:"hash"` Nonce string `json:"nonce"` BlockHash string `json:"blockHash"` TransactionIndex string `json:"transactionIndex"` From string `json:"from"` To string `json:"to"` Value string `json:"value"` Gas string `json:"gas"` GasPrice string `json:"gasPrice"` IsError string `json:"isError"` Input string `json:"input"` ContractAddress string `json:"contractAddress"` CumulativeGasUsed string `json:"cumulativeGasUsed"` GasUsed string `json:"gasUsed"` Confirmations string `json:"confirmations"` }
func EtherscanTxList ¶
func EtherscanTxList(address string) ([]*EtherscanTransaction, error)
func EtherscanTxListWithStartBlock ¶
func EtherscanTxListWithStartBlock(address string, startBlock int64) ([]*EtherscanTransaction, error)
func (*EtherscanTransaction) JSONBuffer ¶
func (e *EtherscanTransaction) JSONBuffer(b *bytes.Buffer) error
func (*EtherscanTransaction) JSONByte ¶
func (e *EtherscanTransaction) JSONByte() ([]byte, error)
func (*EtherscanTransaction) JSONString ¶
func (e *EtherscanTransaction) JSONString() (string, error)
func (*EtherscanTransaction) String ¶
func (e *EtherscanTransaction) String() string
type FilterOptions ¶
type FilterOptions struct { FromBlock string `json:"fromBlock,omitempty"` ToBlock string `json:"toBlock,omitempty"` Address string `json:"address,omitempty"` Topics []string `json:"topics,omitempty"` }
func (*FilterOptions) JSONBuffer ¶
func (e *FilterOptions) JSONBuffer(b *bytes.Buffer) error
func (*FilterOptions) JSONByte ¶
func (e *FilterOptions) JSONByte() ([]byte, error)
func (*FilterOptions) JSONString ¶
func (e *FilterOptions) JSONString() (string, error)
func (*FilterOptions) String ¶
func (e *FilterOptions) String() string
type JSON2Request ¶
type JSON2Request struct { JSONRPC string `json:"jsonrpc"` ID interface{} `json:"id"` Params interface{} `json:"params,omitempty"` Method string `json:"method,omitempty"` }
func NewJSON2Request ¶
func NewJSON2Request(id, params interface{}, method string) *JSON2Request
func NewJSON2RequestBlank ¶
func NewJSON2RequestBlank() *JSON2Request
func ParseJSON2Request ¶
func ParseJSON2Request(request string) (*JSON2Request, error)
func (*JSON2Request) JSONBuffer ¶
func (e *JSON2Request) JSONBuffer(b *bytes.Buffer) error
func (*JSON2Request) JSONByte ¶
func (e *JSON2Request) JSONByte() ([]byte, error)
func (*JSON2Request) JSONString ¶
func (e *JSON2Request) JSONString() (string, error)
func (*JSON2Request) String ¶
func (e *JSON2Request) String() string
type JSON2Response ¶
type JSON2Response struct { JSONRPC string `json:"jsonrpc"` ID interface{} `json:"id"` Error *JSONError `json:"error,omitempty"` Result interface{} `json:"result,omitempty"` }
func Call ¶
func Call(method string, params interface{}) (*JSON2Response, error)
func NewJSON2Response ¶
func NewJSON2Response() *JSON2Response
func (*JSON2Response) AddError ¶
func (j *JSON2Response) AddError(code int, message string, data interface{})
func (*JSON2Response) JSONBuffer ¶
func (e *JSON2Response) JSONBuffer(b *bytes.Buffer) error
func (*JSON2Response) JSONByte ¶
func (e *JSON2Response) JSONByte() ([]byte, error)
func (*JSON2Response) JSONString ¶
func (e *JSON2Response) JSONString() (string, error)
func (*JSON2Response) String ¶
func (e *JSON2Response) String() string
type JSONError ¶
type JSONError struct { Code int `json:"code"` Message string `json:"message"` Data interface{} `json:"data,omitempty"` }
func NewJSONError ¶
type LogObject ¶
type LogObject struct { Type string `json:"type"` TransactionIndex string `json:"transactionIndex"` TransactionHash string `json:"transactionHash"` BlockHash string `json:"blockHash"` BlockNumber string `json:"blockNumber"` Address string `json:"address"` Data string `json:"data"` Topics []string `json:"topics"` // contains filtered or unexported fields }
func (*LogObject) JSONString ¶
type Message ¶
type Message struct { Hash string `json:"hash"` From string `json:"from"` To string `json:"to"` Expiry string `json:"expiry"` TTL string `json:"ttl"` Sent string `json:"sent"` Topics []string `json:"topics"` Payload string `json:"payload"` WorkProved string `json:"workProved"` }
func (*Message) JSONString ¶
type Quantity ¶
type Quantity int64
func NetPeerCount ¶
func NewQuantityFromInt ¶
func NewQuantityFromString ¶
func (*Quantity) JSONString ¶
func (*Quantity) MarshalText ¶
func (*Quantity) UnmarshalText ¶
type TransactionObject ¶
type TransactionObject struct { Hash string `json:"hash,omitempty"` Nonce string `json:"nonce,omitempty"` BlockHash string `json:"blockHash,omitempty"` BlockNumber string `json:"blockNumber,omitempty"` TransactionIndex string `json:"transactionIndex,omitempty"` From string `json:"from"` To string `json:"to,omitempty"` Gas string `json:"gas,omitempty"` GasPrice string `json:"gasPrice,omitempty"` Value string `json:"value,omitempty"` Data string `json:"data,omitempty"` Input string `json:"input,omitempty"` }
func EthGetTransactionByBlockHashAndIndex ¶
func EthGetTransactionByBlockHashAndIndex(blockHash, txIndex string) (*TransactionObject, error)
TODO: test
func EthGetTransactionByBlockNumberAndIndex ¶
func EthGetTransactionByBlockNumberAndIndex(blockNumberOrTag string, txIndex string) (*TransactionObject, error)
TODO: test
func EthGetTransactionByHash ¶
func EthGetTransactionByHash(txHash string) (*TransactionObject, error)
TODO: test
func (*TransactionObject) JSONBuffer ¶
func (e *TransactionObject) JSONBuffer(b *bytes.Buffer) error
func (*TransactionObject) JSONByte ¶
func (e *TransactionObject) JSONByte() ([]byte, error)
func (*TransactionObject) JSONString ¶
func (e *TransactionObject) JSONString() (string, error)
func (*TransactionObject) String ¶
func (e *TransactionObject) String() string
type TransactionReceipt ¶
type TransactionReceipt struct { TransactionHash string `json:"transactionHash"` TransactionIndex string `json:"transactionIndex"` BlockHash string `json:"blockHash"` BlockNumber string `json:"blockNumber"` CumulativeGasUsed string `json:"cumulativeGasUsed"` GasUsed string `json:"gasUsed"` ContractAddress string `json:"contractAddress"` Logs []interface{} `json:"logs"` }
func EthGetTransactionReceipt ¶
func EthGetTransactionReceipt(txHash string) (*TransactionReceipt, error)
TODO: test
func (*TransactionReceipt) JSONBuffer ¶
func (e *TransactionReceipt) JSONBuffer(b *bytes.Buffer) error
func (*TransactionReceipt) JSONByte ¶
func (e *TransactionReceipt) JSONByte() ([]byte, error)
func (*TransactionReceipt) JSONString ¶
func (e *TransactionReceipt) JSONString() (string, error)
func (*TransactionReceipt) String ¶
func (e *TransactionReceipt) String() string
type WhisperMessage ¶
type WhisperMessage struct { From string `json:"from,omitempty"` To string `json:"to,omitempty"` Topics string `json:"topics"` Payload string `json:"payload"` Priority string `json:"priority"` TTL string `json:"ttl"` }
func (*WhisperMessage) JSONBuffer ¶
func (e *WhisperMessage) JSONBuffer(b *bytes.Buffer) error
func (*WhisperMessage) JSONByte ¶
func (e *WhisperMessage) JSONByte() ([]byte, error)
func (*WhisperMessage) JSONString ¶
func (e *WhisperMessage) JSONString() (string, error)
func (*WhisperMessage) String ¶
func (e *WhisperMessage) String() string
Click to show internal directories.
Click to hide internal directories.