diff options
author | Wei-Ning Huang <w@dexon.org> | 2019-03-17 09:12:50 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:58 +0800 |
commit | 2818ad97f5b302f76e3296195bf8daae1868c435 (patch) | |
tree | 0e055a8dc82f8a473f877400074dffe7b811090c /vendor/github.com/onrik/ethrpc/interface.go | |
parent | 9c9073db149d89eb31dc7c68d440b359f42fe8e9 (diff) | |
download | dexon-2818ad97f5b302f76e3296195bf8daae1868c435.tar.gz dexon-2818ad97f5b302f76e3296195bf8daae1868c435.tar.zst dexon-2818ad97f5b302f76e3296195bf8daae1868c435.zip |
dex: implement recovery mechanism (#258)
* dex: implement recovery mechanism
The DEXON recovery protocol allows us to use the Ethereum blockchain as a
fallback consensus chain to coordinate recovery.
* fix
Diffstat (limited to 'vendor/github.com/onrik/ethrpc/interface.go')
-rw-r--r-- | vendor/github.com/onrik/ethrpc/interface.go | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/vendor/github.com/onrik/ethrpc/interface.go b/vendor/github.com/onrik/ethrpc/interface.go new file mode 100644 index 000000000..2e3021d1b --- /dev/null +++ b/vendor/github.com/onrik/ethrpc/interface.go @@ -0,0 +1,50 @@ +package ethrpc + +import ( + "math/big" +) + +type EthereumAPI interface { + Web3ClientVersion() (string, error) + Web3Sha3(data []byte) (string, error) + NetVersion() (string, error) + NetListening() (bool, error) + NetPeerCount() (int, error) + EthProtocolVersion() (string, error) + EthSyncing() (*Syncing, error) + EthCoinbase() (string, error) + EthMining() (bool, error) + EthHashrate() (int, error) + EthGasPrice() (big.Int, error) + EthAccounts() ([]string, error) + EthBlockNumber() (int, error) + EthGetBalance(address, block string) (big.Int, error) + EthGetStorageAt(data string, position int, tag string) (string, error) + EthGetTransactionCount(address, block string) (int, error) + EthGetBlockTransactionCountByHash(hash string) (int, error) + EthGetBlockTransactionCountByNumber(number int) (int, error) + EthGetUncleCountByBlockHash(hash string) (int, error) + EthGetUncleCountByBlockNumber(number int) (int, error) + EthGetCode(address, block string) (string, error) + EthSign(address, data string) (string, error) + EthSendTransaction(transaction T) (string, error) + EthSendRawTransaction(data string) (string, error) + EthCall(transaction T, tag string) (string, error) + EthEstimateGas(transaction T) (int, error) + EthGetBlockByHash(hash string, withTransactions bool) (*Block, error) + EthGetBlockByNumber(number int, withTransactions bool) (*Block, error) + EthGetTransactionByHash(hash string) (*Transaction, error) + EthGetTransactionByBlockHashAndIndex(blockHash string, transactionIndex int) (*Transaction, error) + EthGetTransactionByBlockNumberAndIndex(blockNumber, transactionIndex int) (*Transaction, error) + EthGetTransactionReceipt(hash string) (*TransactionReceipt, error) + EthGetCompilers() ([]string, error) + EthNewFilter(params FilterParams) (string, error) + EthNewBlockFilter() (string, error) + EthNewPendingTransactionFilter() (string, error) + EthUninstallFilter(filterID string) (bool, error) + EthGetFilterChanges(filterID string) ([]Log, error) + EthGetFilterLogs(filterID string) ([]Log, error) + EthGetLogs(params FilterParams) ([]Log, error) +} + +var _ EthereumAPI = (*EthRPC)(nil) |