C# Класс EthereumRpc.EthereumService

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Call ( Transaction transaction ) : string
CompileLLL ( ) : string
CompileSerpent ( ) : string
CompileSolidity ( string contract ) : RpcResult
EstimateGas ( Transaction transaction ) : string
EthereumService ( ) : System
EthereumService ( ConnectionOptions connectionOptions ) : System
EthereumService ( string url, string port ) : System
GetAccounts ( ) : string[]

Returns a list of addresses owned by client.

GetBalance ( string address, BlockTag blockTag = BlockTag.Quantity, int blockNumber = -1 ) : System.Numerics.BigInteger

Returns the balance of the account of given address.

GetBlockByHash ( string hash, bool returnFullBlock ) : Block
GetBlockByNumber ( int blockNumber, BlockTag blockTag, bool returnFullObject ) : Block
GetBlockFilterChanges ( string filterId ) : List
GetBlockNumber ( ) : long

Returns the number of most recent block.

GetBlockTransactionCountByHash ( string blockHash ) : long

Returns the number of transactions in a block from a block matching the given block hash.

GetBlockTransactionCountByNumber ( BlockTag blockTag = BlockTag.Quantity, int blockNumber = -1 ) : long

Returns the number of transactions in a block from a block matching the given block number.

GetCode ( string address, BlockTag blockTag = BlockTag.Quantity, int blockNumber = -1 ) : string

Returns code at a given address.

GetCoinbase ( ) : Address

Returns the client coinbase address.

GetCompilers ( ) : string[]
GetFilterChanges ( string filterId ) : Log[]
GetFilterLogs ( string filterId ) : string[]
GetGasPrice ( ) : long

Returns the current price per gas in wei.

GetHashrate ( ) : long

Returns the number of hashes per second that the node is mining with.

GetLogs ( Log log ) : string[]
GetMining ( ) : bool

Returns true if client is actively mining new blocks.

GetNetListening ( ) : bool

Returns true if client is actively listening for network connections.

GetNetPeerCount ( ) : int

Returns number of peers currenly connected to the client.

GetNetVersion ( ) : string

Returns the current network protocol version.

GetProtocolVersion ( ) : string

Returns the current ethereum protocol version.

GetStorageAt ( string address, int storagePosition, BlockTag blockTag = BlockTag.Quantity, int blockNumber = -1 ) : long

Returns the value from a storage position at a given address.

GetSyncing ( ) : SyncStatus

Returns an object object with data about the sync status or FALSE.

GetTransactionByBlockHashAndIndex ( string hash, int index ) : Transaction
GetTransactionByBlockNumberAndIndex ( int blockNumber, int index ) : Transaction
GetTransactionByHash ( string hash ) : Transaction
GetTransactionCount ( string address, BlockTag blockTag = BlockTag.Quantity, int blockNumber = -1 ) : long

Returns the number of transactions sent from an address.

GetTransactionReceipt ( string transactionHash ) : Transaction
GetUncleByBlockHashAndIndex ( string hash, int index ) : Block
GetUncleByBlockNumberAndIndex ( int blockNumber, int index ) : Block
GetUncleCountByBlockHash ( string hashBlock ) : long

Returns the number of uncles in a block from a block matching the given block hash.

GetUncleCountByBlockNumber ( int blockNumber ) : long

Returns the number of uncles in a block from a block matching the given block number.

GetWeb3ClientVersion ( ) : string

Returns the current client version

GetWeb3Sha3 ( string value ) : string

Returns Keccak-256 (not the standardized SHA3-256) of the given data.

GetWork ( ) : Work
NewAccount ( string password ) : string
NewBlockFilter ( ) : string
NewFilter ( Filter filter ) : string

Creates a filter object, based on filter options, to notify when the state changes (logs). To check if the state has changed, call GetFilterChanges.

NewPendingTransactionFilter ( ) : string
SendRawTransaction ( string data ) : string

Creates new message call transaction or a contract creation for signed transactions.

SendTransaction ( Transaction transaction ) : string
SendTransaction ( string from, string to, int gas, string data, int gasPrice = -1, int value = -1, int nonce = -1 ) : string

Creates new message call transaction or a contract creation, if the data field contains code.

ShhPost ( string from, string to, string topics, string payload, string priority, string ttl ) : string
ShhVersion ( ) : string

Returns the current whisper protocol version.

Sign ( string address, string data ) : string

Signs data with a given address.

SubmitHashrate ( string hashRate, string clientId ) : bool

Used for submitting mining hashrate.

SubmitWork ( string nonce, string powHash, string mix ) : bool

Used for submitting a proof-of-work solution.

UninstallFilter ( string filterId ) : bool
UnlockAccount ( string account, string password ) : bool

Unlocks account using password

Описание методов

Call() публичный Метод

public Call ( Transaction transaction ) : string
transaction EthereumRpc.RpcObjects.Transaction
Результат string

CompileLLL() публичный Метод

public CompileLLL ( ) : string
Результат string

CompileSerpent() публичный Метод

public CompileSerpent ( ) : string
Результат string

CompileSolidity() публичный Метод

public CompileSolidity ( string contract ) : RpcResult
contract string
Результат RpcResult

EstimateGas() публичный Метод

public EstimateGas ( Transaction transaction ) : string
transaction EthereumRpc.RpcObjects.Transaction
Результат string

EthereumService() публичный Метод

public EthereumService ( ) : System
Результат System

EthereumService() публичный Метод

public EthereumService ( ConnectionOptions connectionOptions ) : System
connectionOptions ConnectionOptions
Результат System

EthereumService() публичный Метод

public EthereumService ( string url, string port ) : System
url string
port string
Результат System

GetAccounts() публичный Метод

Returns a list of addresses owned by client.
public GetAccounts ( ) : string[]
Результат string[]

GetBalance() публичный Метод

Returns the balance of the account of given address.
public GetBalance ( string address, BlockTag blockTag = BlockTag.Quantity, int blockNumber = -1 ) : System.Numerics.BigInteger
address string address to check for balance.
blockTag BlockTag integer block number
blockNumber int Block param
Результат System.Numerics.BigInteger

GetBlockByHash() публичный Метод

public GetBlockByHash ( string hash, bool returnFullBlock ) : Block
hash string
returnFullBlock bool
Результат EthereumRpc.Ethereum.Block

GetBlockByNumber() публичный Метод

public GetBlockByNumber ( int blockNumber, BlockTag blockTag, bool returnFullObject ) : Block
blockNumber int
blockTag BlockTag
returnFullObject bool
Результат EthereumRpc.Ethereum.Block

GetBlockFilterChanges() публичный Метод

public GetBlockFilterChanges ( string filterId ) : List
filterId string
Результат List

GetBlockNumber() публичный Метод

Returns the number of most recent block.
public GetBlockNumber ( ) : long
Результат long

GetBlockTransactionCountByHash() публичный Метод

Returns the number of transactions in a block from a block matching the given block hash.
public GetBlockTransactionCountByHash ( string blockHash ) : long
blockHash string hash of a block
Результат long

GetBlockTransactionCountByNumber() публичный Метод

Returns the number of transactions in a block from a block matching the given block number.
public GetBlockTransactionCountByNumber ( BlockTag blockTag = BlockTag.Quantity, int blockNumber = -1 ) : long
blockTag BlockTag Block Param
blockNumber int integer of a block number,
Результат long

GetCode() публичный Метод

Returns code at a given address.
public GetCode ( string address, BlockTag blockTag = BlockTag.Quantity, int blockNumber = -1 ) : string
address string address
blockTag BlockTag
blockNumber int integer block number,
Результат string

GetCoinbase() публичный Метод

Returns the client coinbase address.
public GetCoinbase ( ) : Address
Результат Address

GetCompilers() публичный Метод

public GetCompilers ( ) : string[]
Результат string[]

GetFilterChanges() публичный Метод

public GetFilterChanges ( string filterId ) : Log[]
filterId string
Результат Log[]

GetFilterLogs() публичный Метод

public GetFilterLogs ( string filterId ) : string[]
filterId string
Результат string[]

GetGasPrice() публичный Метод

Returns the current price per gas in wei.
public GetGasPrice ( ) : long
Результат long

GetHashrate() публичный Метод

Returns the number of hashes per second that the node is mining with.
public GetHashrate ( ) : long
Результат long

GetLogs() публичный Метод

public GetLogs ( Log log ) : string[]
log Log
Результат string[]

GetMining() публичный Метод

Returns true if client is actively mining new blocks.
public GetMining ( ) : bool
Результат bool

GetNetListening() публичный Метод

Returns true if client is actively listening for network connections.
public GetNetListening ( ) : bool
Результат bool

GetNetPeerCount() публичный Метод

Returns number of peers currenly connected to the client.
public GetNetPeerCount ( ) : int
Результат int

GetNetVersion() публичный Метод

Returns the current network protocol version.
public GetNetVersion ( ) : string
Результат string

GetProtocolVersion() публичный Метод

Returns the current ethereum protocol version.
public GetProtocolVersion ( ) : string
Результат string

GetStorageAt() публичный Метод

Returns the value from a storage position at a given address.
public GetStorageAt ( string address, int storagePosition, BlockTag blockTag = BlockTag.Quantity, int blockNumber = -1 ) : long
address string address of the storage.
storagePosition int integer of the position in the storage.
blockTag BlockTag Block Param
blockNumber int integer block number
Результат long

GetSyncing() публичный Метод

Returns an object object with data about the sync status or FALSE.
public GetSyncing ( ) : SyncStatus
Результат EthereumRpc.RpcObjects.SyncStatus

GetTransactionByBlockHashAndIndex() публичный Метод

public GetTransactionByBlockHashAndIndex ( string hash, int index ) : Transaction
hash string
index int
Результат EthereumRpc.RpcObjects.Transaction

GetTransactionByBlockNumberAndIndex() публичный Метод

public GetTransactionByBlockNumberAndIndex ( int blockNumber, int index ) : Transaction
blockNumber int
index int
Результат EthereumRpc.RpcObjects.Transaction

GetTransactionByHash() публичный Метод

public GetTransactionByHash ( string hash ) : Transaction
hash string
Результат EthereumRpc.RpcObjects.Transaction

GetTransactionCount() публичный Метод

Returns the number of transactions sent from an address.
public GetTransactionCount ( string address, BlockTag blockTag = BlockTag.Quantity, int blockNumber = -1 ) : long
address string address
blockTag BlockTag Block Param
blockNumber int integer block number,
Результат long

GetTransactionReceipt() публичный Метод

public GetTransactionReceipt ( string transactionHash ) : Transaction
transactionHash string
Результат EthereumRpc.RpcObjects.Transaction

GetUncleByBlockHashAndIndex() публичный Метод

public GetUncleByBlockHashAndIndex ( string hash, int index ) : Block
hash string
index int
Результат EthereumRpc.Ethereum.Block

GetUncleByBlockNumberAndIndex() публичный Метод

public GetUncleByBlockNumberAndIndex ( int blockNumber, int index ) : Block
blockNumber int
index int
Результат EthereumRpc.Ethereum.Block

GetUncleCountByBlockHash() публичный Метод

Returns the number of uncles in a block from a block matching the given block hash.
public GetUncleCountByBlockHash ( string hashBlock ) : long
hashBlock string hash of a block
Результат long

GetUncleCountByBlockNumber() публичный Метод

Returns the number of uncles in a block from a block matching the given block number.
public GetUncleCountByBlockNumber ( int blockNumber ) : long
blockNumber int integer of a block number
Результат long

GetWeb3ClientVersion() публичный Метод

Returns the current client version
public GetWeb3ClientVersion ( ) : string
Результат string

GetWeb3Sha3() публичный Метод

Returns Keccak-256 (not the standardized SHA3-256) of the given data.
public GetWeb3Sha3 ( string value ) : string
value string the data to convert into a SHA3 hash
Результат string

GetWork() публичный Метод

public GetWork ( ) : Work
Результат EthereumRpc.Ethereum.Work

NewAccount() публичный Метод

public NewAccount ( string password ) : string
password string
Результат string

NewBlockFilter() публичный Метод

public NewBlockFilter ( ) : string
Результат string

NewFilter() публичный Метод

Creates a filter object, based on filter options, to notify when the state changes (logs). To check if the state has changed, call GetFilterChanges.
public NewFilter ( Filter filter ) : string
filter EthereumRpc.Ethereum.Filter
Результат string

NewPendingTransactionFilter() публичный Метод

public NewPendingTransactionFilter ( ) : string
Результат string

SendRawTransaction() публичный Метод

Creates new message call transaction or a contract creation for signed transactions.
public SendRawTransaction ( string data ) : string
data string The signed transaction data.
Результат string

SendTransaction() публичный Метод

public SendTransaction ( Transaction transaction ) : string
transaction EthereumRpc.RpcObjects.Transaction
Результат string

SendTransaction() публичный Метод

Creates new message call transaction or a contract creation, if the data field contains code.
public SendTransaction ( string from, string to, int gas, string data, int gasPrice = -1, int value = -1, int nonce = -1 ) : string
from string The address the transaction is send from.
to string (optional when creating new contract) The address the transaction is directed to.
gas int (optional, default: 90000) Integer of the gas provided for the transaction execution. It will return unused gas.
data string (optional) The compiled code of a contract
gasPrice int (optional, default: To-Be-Determined) Integer of the gasPrice used for each paid gas
value int (optional) Integer of the value send with this transaction
nonce int (optional) Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce.
Результат string

ShhPost() публичный Метод

public ShhPost ( string from, string to, string topics, string payload, string priority, string ttl ) : string
from string
to string
topics string
payload string
priority string
ttl string
Результат string

ShhVersion() публичный Метод

Returns the current whisper protocol version.
public ShhVersion ( ) : string
Результат string

Sign() публичный Метод

Signs data with a given address.
public Sign ( string address, string data ) : string
address string address
data string Data to sign
Результат string

SubmitHashrate() публичный Метод

Used for submitting mining hashrate.
public SubmitHashrate ( string hashRate, string clientId ) : bool
hashRate string a hexadecimal string representation (32 bytes) of the hash rate
clientId string A random hexadecimal(32 bytes) ID identifying the client
Результат bool

SubmitWork() публичный Метод

Used for submitting a proof-of-work solution.
public SubmitWork ( string nonce, string powHash, string mix ) : bool
nonce string The nonce found(64 bits)
powHash string The header's pow-hash (256 bits)
mix string The mix digest(256 bits)
Результат bool

UninstallFilter() публичный Метод

public UninstallFilter ( string filterId ) : bool
filterId string
Результат bool

UnlockAccount() публичный Метод

Unlocks account using password
public UnlockAccount ( string account, string password ) : bool
account string The account address
password string The password for the account
Результат bool