Packages

c

com.micronautics.web3j

EthereumASynchronous

class EthereumASynchronous extends AnyRef

All of the methods in this class return a scala.concurrent.Future and do not block.

Source
EthereumASynchronous.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EthereumASynchronous
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new EthereumASynchronous(web3j: Web3j)(implicit ec: ExecutionContext = defaultExecutionContext)

    web3j

    can be shared with EthereumSynchronous

    ec

    if no scala.concurrent.ExecutionContext is implicitly available, the default Scala scala.concurrent.ExecutionContext is used.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def accounts: Future[List[Address]]

    Invokes the eth_accounts JSON-RPC endpoint.

    Invokes the eth_accounts JSON-RPC endpoint.

    returns

    the list of addresses owned by the client

  5. def addToGroup(identityAddress: Address): Future[Boolean]

    Add the given identity address to the Whisper group.

    Add the given identity address to the Whisper group.

    Invokes the shh_addtogroup JSON-RPC endpoint.

    returns

    true if the identity was successfully added to the group

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def balance(address: Address, defaultBlockParameter: DefaultBlockParameter): Future[Ether]

    Invokes the eth_getbalance JSON-RPC endpoint.

    Invokes the eth_getbalance JSON-RPC endpoint.

    defaultBlockParameter

    either an integer block number, or the string "latest", "earliest" or "pending". See the specification.

    returns

    the balance of the account of given address

  8. def blockByHash(blockHash: BlockHash, returnFullTransactionObjects: Boolean): Future[Option[Block]]

    Invokes the eth_getblockbyhash JSON-RPC endpoint.

    Invokes the eth_getblockbyhash JSON-RPC endpoint.

    returns

    Option[EthBlock.Block]

  9. def blockByNumber(defaultBlockParameter: DefaultBlockParameter, returnFullTransactionObjects: Boolean = false): Future[Option[Block]]

    Invokes the eth_getblockbyhash JSON-RPC endpoint.

    Invokes the eth_getblockbyhash JSON-RPC endpoint.

    returns

    Some(block object), or None if no block was found

  10. def blockNumber: Future[BigInteger]

    Invokes the eth_blocknumber JSON-RPC endpoint.

    Invokes the eth_blocknumber JSON-RPC endpoint.

    returns

    the number of the most recent block

  11. def blockTransactionCountByHash(blockHash: String): Future[BigInteger]
  12. def blockTransactionCountByNumber(defaultBlockParameter: DefaultBlockParameter): Future[BigInteger]
  13. def call(transaction: Transaction, defaultBlockParameter: DefaultBlockParameter): Future[String]

    Invokes the eth_call JSON-RPC endpoint.

    Invokes the eth_call JSON-RPC endpoint.

    returns

    value of executed contract, without creating a transaction on the block chain

  14. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  15. def code(address: Address, defaultBlockParameter: DefaultBlockParameter): Future[String]

    Invokes the eth_getcode JSON-RPC endpoint.

    Invokes the eth_getcode JSON-RPC endpoint.

    returns

    code at a given address

  16. def coinbaseAddress: Future[Address]

    Invokes the eth_coinbase JSON-RPC endpoint.

    Invokes the eth_coinbase JSON-RPC endpoint.

    returns

    the client coinbase address

  17. def compileLLL(sourceCode: LLLSource): Future[LLLCompiled]

    Invokes the eth_compilelll JSON-RPC endpoint.

    Invokes the eth_compilelll JSON-RPC endpoint.

    returns

    compiled LLL code

  18. def compileSerpent(sourceCode: SerpentSource): Future[SerpentCompiled]

    Invokes the eth_compileserpent JSON-RPC endpoint.

    Invokes the eth_compileserpent JSON-RPC endpoint.

    returns

    compiled Serpent code

  19. def compileSolidity(sourceCode: SoliditySource): Future[Map[String, Code]]

    Invokes the eth_compilesolidity JSON-RPC endpoint.

    Invokes the eth_compilesolidity JSON-RPC endpoint.

    returns

    compiled Solidity code

  20. def compilers: Future[List[Compiler]]

    Invokes the eth_getcompilers JSON-RPC endpoint.

    Invokes the eth_getcompilers JSON-RPC endpoint.

    returns

    a list of available compilers found by the underlying Web3J library

  21. implicit val ec: ExecutionContext
  22. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  24. def estimateGas(transaction: Transaction): Future[Ether]

    Makes a call or transaction, which won't be added to the blockchain and returns the used gas, which can be used for estimating the used gas.

    Makes a call or transaction, which won't be added to the blockchain and returns the used gas, which can be used for estimating the used gas. Invokes the eth_estimategas JSON-RPC endpoint.

    returns

    amount of gas estimated

  25. def filterChangesEth(filterId: FilterId): Future[List[LogResult[_]]]

    Polling method for an eth filter.

    Polling method for an eth filter.

    Invokes the eth_getfilterchanges JSON-RPC endpoint.

    returns

    List of log items since last poll, could be Nil if nothing changed since the last poll

  26. def filterChangesShh(filterId: FilterId): Future[List[SshMessage]]

    Polling method for a Whisper filter.

    Polling method for a Whisper filter.

    Note: calling shh_getMessages will reset the buffer for this method to avoid duplicate messages.

    Invokes the shh_getfilterchanges JSON-RPC endpoint.

    returns

    List of messages since the last poll; could be Nil if nothing changed since the last poll

  27. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  28. def gasPrice: Future[Ether]

    Invokes the eth_gasprice JSON-RPC endpoint.

    Invokes the eth_gasprice JSON-RPC endpoint.

    returns

    the current price per gas in wei

  29. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  30. def hasIdentity(identityAddress: Address): Future[Boolean]

    Checks if the client hold the private keys for a given identity.

    Checks if the client hold the private keys for a given identity.

    Invokes the shh_hasidentity JSON-RPC endpoint.

    returns

    returns true if this client holds the private key for that identity

  31. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  32. def hashRate: Future[BigInteger]

    Invokes the eth_hashrate JSON-RPC endpoint.

    Invokes the eth_hashrate JSON-RPC endpoint.

    returns

    the number of hashes per second that the node is mining at

  33. def hashRate(hashRate: String, clientId: String): Future[Boolean]

    Used for submitting mining hash rate

    Used for submitting mining hash rate

    Invokes the eth_submithashrate JSON-RPC endpoint.

    returns

    true if submitting successfully

  34. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  35. def isListening: Future[Boolean]

    Invokes the net_listening JSON-RPC endpoint.

    Invokes the net_listening JSON-RPC endpoint.

    returns

    true if this client is actively listening for network connections

  36. def isMining: Future[Boolean]

    Invokes the eth_mining JSON-RPC endpoint.

  37. def isSyncing: Future[Boolean]

    Invokes the eth_syncing JSON-RPC endpoint.

  38. def logs(filterId: FilterId): Future[List[LogResult[_]]]

    Invokes the eth_getfilterlogs JSON-RPC endpoint.

    Invokes the eth_getfilterlogs JSON-RPC endpoint.

    returns

    List of all log items with the matching filter id

  39. def logs(ethFilter: EthFilter): Future[List[LogResult[_]]]

    Invokes the eth_getlogs JSON-RPC endpoint.

    Invokes the eth_getlogs JSON-RPC endpoint.

    returns

    List of all log items matching a given filter object

  40. def messages(filterId: FilterId): Future[List[SshMessage]]

    Invokes the shh_getmessages JSON-RPC endpoint.

    Invokes the shh_getmessages JSON-RPC endpoint.

    returns

    all Whisper messages matching a filter

  41. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  42. def newBlockFilter: Future[FilterId]

    Creates a filter in the node, to notify when the state changes (logs).

    Creates a filter in the node, to notify when the state changes (logs). To check if the state has changed, call filterChanges.

    Invokes the eth_newblockfilter JSON-RPC endpoint.

    returns

    filter id

  43. def newFilter(shhFilter: ShhFilter): Future[FilterId]

    Create filter that notifies the client when whisper message is received that matches the filter options.

    Create filter that notifies the client when whisper message is received that matches the filter options.

    Invokes the shh_newfilter JSON-RPC endpoint.

    returns

    The newly created filter as a BigInteger

  44. def newFilter(ethFilter: EthFilter): Future[FilterId]

    Creates a filter object, based on filter options, to notify when the state changes (logs).

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

    Topics are order-dependent. A transaction with a log with topics [A, B] will be matched by the following topic filters:

    - [] "anything" - [A] "A in first position (and anything after)" - [null, B] "anything in first position AND B in second position (and anything after)" - [A, B] "A in first position AND B in second position (and anything after)" - [ [A, B], [A, B] ] "(A OR B) in first position AND (A OR B) in second position (and anything after)"

    Invokes the eth_newfilter JSON-RPC endpoint.

    returns

    filter id

  45. def newGroup: Future[Address]

    New Whisper group.

    New Whisper group.

    Invokes the shh_newgroup JSON-RPC endpoint.

    returns

    address of the new group

  46. def newIdentity: Future[Address]

    Invokes the shh_newidentity JSON-RPC endpoint.

    Invokes the shh_newidentity JSON-RPC endpoint.

    returns

    address of the new whisper identity

  47. def newPendingTransactionFilter: Future[FilterId]
  48. def nextNonce(address: Address): Future[Nonce]

    Get the next available nonce before creating a transaction

  49. def nonce(address: Address, defaultBlockParameter: DefaultBlockParameter): Future[Nonce]

    Invokes the eth_gettransactioncount JSON-RPC endpoint.

    Invokes the eth_gettransactioncount JSON-RPC endpoint.

    returns

    the number of transactions sent from an address

    See also

    See Glossary

  50. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  51. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  52. def peerCount: Future[BigInteger]

    Invokes the net_peercount JSON-RPC endpoint.

    Invokes the net_peercount JSON-RPC endpoint.

    returns

    number of peers currently connected to this client

  53. def post(shhPost: ShhPost): Future[Boolean]

    Sends a whisper message.

    Sends a whisper message.

    Invokes the shh_post JSON-RPC endpoint.

    returns

    true if the message was sent

  54. def sendRawTransaction(signedTransactionData: SignedData): Future[TransactionHash]

    Invokes the eth_sendrawtransaction JSON-RPC endpoint.

    Invokes the eth_sendrawtransaction JSON-RPC endpoint.

    returns

    new message call transaction or a contract creation for signed transactions

  55. def sendTransaction(transaction: Transaction): Future[TransactionHash]

    Invokes the eth_sendtransaction JSON-RPC endpoint.

    Invokes the eth_sendtransaction JSON-RPC endpoint.

    returns

    a new contract if the

    Transaction.data
  56. def sha3(data: String): Future[Keccak256Hash]

    Invokes the web3_sha3 JSON-RPC endpoint.

    Invokes the web3_sha3 JSON-RPC endpoint.

    data

    the data to convert into an SHA3 hash

    returns

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

  57. def sign(address: Address, sha3HashOfDataToSign: Keccak256Hash): Future[Signature]

    Calculates an Ethereum-specific signature with:

    Calculates an Ethereum-specific signature with:

    sign(keccak256("\x19Ethereum Signed Message:\n" + len(message) + message)))

    By adding a prefix to the message makes the calculated signature recognisable as an Ethereum-specific signature. This prevents misuse where a malicious DApp can sign arbitrary data (e.g. transaction) and use the signature to impersonate the victim.

    Note: the address to sign with must be unlocked.

    Invokes the eth_sign JSON-RPC endpoint.

    returns

    Signature

  58. def storageAt(address: Address, position: BigInteger, defaultBlockParameter: DefaultBlockParameter): Future[String]

    Invokes the eth_getstorageat JSON-RPC endpoint.

    Invokes the eth_getstorageat JSON-RPC endpoint.

    returns

    the value from a storage position at a given address

  59. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  60. def toString(): String
    Definition Classes
    AnyRef → Any
  61. def transactionByBlockHashAndIndex(blockHash: BlockHash, transactionIndex: BigInteger): Future[Optional[Transaction]]

    Invokes the eth_gettransactionbyblockhashandindex JSON-RPC endpoint.

    Invokes the eth_gettransactionbyblockhashandindex JSON-RPC endpoint.

    returns

    Some containing transaction information by block hash and transaction index position, or None if no matching transaction was found

  62. def transactionByBlockNumberAndIndex(defaultBlockParameter: DefaultBlockParameter, transactionIndex: BigInteger): Future[Optional[Transaction]]

    Invokes the eth_gettransactionbyblocknumberandindex JSON-RPC endpoint.

    Invokes the eth_gettransactionbyblocknumberandindex JSON-RPC endpoint.

    returns

    Some containing transaction information by block hash and transaction index position, or None if no matching transaction was found

  63. def transactionByHash(transactionHash: TransactionHash): Future[Optional[Transaction]]

    Invokes the eth_gettransactionbyhash JSON-RPC endpoint.

    Invokes the eth_gettransactionbyhash JSON-RPC endpoint.

    returns

    Future containing Some(transaction object), or None when no transaction was found

  64. def transactionReceipt(transactionHash: TransactionHash): Future[Optional[TransactionReceipt]]

    Invokes the eth_gettransactionreceipt JSON-RPC endpoint.

    Invokes the eth_gettransactionreceipt JSON-RPC endpoint.

    returns

    the receipt of a transaction, identified by transaction hash. (Note: receipts are not available for pending transactions.)

  65. def uncleByBlockHashAndIndex(blockHash: BlockHash, transactionIndex: BigInteger): Future[Block]

    Invokes the eth_getunclebyblockhashandindex JSON-RPC endpoint.

    Invokes the eth_getunclebyblockhashandindex JSON-RPC endpoint.

    returns

    information about a uncle of a block by hash and uncle index position

  66. def uncleByBlockNumberAndIndex(defaultBlockParameter: DefaultBlockParameter, transactionIndex: BigInteger): Future[Block]

    Invokes the eth_getunclebyblocknumberandindex JSON-RPC endpoint.

    Invokes the eth_getunclebyblocknumberandindex JSON-RPC endpoint.

    returns

    information about a uncle of a block by hash and uncle index position

  67. def uncleCountByBlockHash(blockHash: BlockHash): Future[BigInteger]

    Invokes the eth_getunclecountbyblockhash JSON-RPC endpoint.

    Invokes the eth_getunclecountbyblockhash JSON-RPC endpoint.

    returns

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

  68. def uncleCountByBlockNumber(defaultBlockParameter: DefaultBlockParameter): Future[BigInteger]

    Invokes the eth_getunclecountbyblocknumber JSON-RPC endpoint.

    Invokes the eth_getunclecountbyblocknumber JSON-RPC endpoint.

    returns

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

  69. def uninstallFilter(filterId: FilterId): Future[Boolean]

    Uninstalls a filter with the given id.

    Uninstalls a filter with the given id. Should always be called when watch is no longer needed.

    Note: Filters time out when they aren't requested with filterChanges for a period of time.

    Invokes the eth_uninstallfilter JSON-RPC endpoint.

    returns

    true if the filter was successfully uninstalled

  70. def uninstallShhFilter(filterId: FilterId): Future[Boolean]

    Uninstalls a Whisper filter with the given id.

    Uninstalls a Whisper filter with the given id. Should always be called when watch is no longer needed.

    Note: Filters time out when they aren't requested with filterChanges for a period of time.

    Invokes the shh_uninstallfilter JSON-RPC endpoint.

    returns

    true if the filter was successfully uninstalled

  71. def versionNet: Future[String]

    Invokes the net_version JSON-RPC endpoint.

    Invokes the net_version JSON-RPC endpoint.

    returns

    the current network id

  72. def versionProtocol: Future[String]

    Invokes the eth_protocolversion JSON-RPC endpoint.

    Invokes the eth_protocolversion JSON-RPC endpoint.

    returns

    ethereum protocol version used by this client

  73. def versionShh: Future[String]

    Invokes the shh_version JSON-RPC endpoint.

    Invokes the shh_version JSON-RPC endpoint.

    returns

    the current whisper protocol version.

  74. def versionWeb3J: Future[String]

    Invokes the web3_clientversion JSON-RPC endpoint.

    Invokes the web3_clientversion JSON-RPC endpoint.

    returns

    the Web3J client version used by this client

  75. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  76. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  77. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  78. val web3j: Web3j
  79. def work(nonce: Nonce, headerPowHash: Keccak256Hash, mixDigest: Digest): Future[Boolean]

    Used for submitting a proof-of-work solution.

    Used for submitting a proof-of-work solution.

    Invokes the eth_submitwork JSON-RPC endpoint.

    returns

    true if the provided solution is valid

  80. def work: Future[EthGetWork]

    Invokes the eth_getwork JSON-RPC endpoint.

    Invokes the eth_getwork JSON-RPC endpoint.

    returns

    the hash of the current block, the seedHash, and the boundary condition to be met ("target"). The Array with the following properties: DATA, 32 Bytes - current block header pow-hash DATA, 32 Bytes - the seed hash used for the DAG. DATA, 32 Bytes - the boundary condition ("target"), 2^^256 / difficulty.

Deprecated Value Members

  1. def hexFrom(databaseName: String, keyName: String): Future[String]

    Retrieves binary data from the local database.

    Retrieves binary data from the local database.

    Invokes the db_gethex JSON-RPC endpoint.

    returns

    the retrieved value

    Annotations
    @deprecated
    Deprecated

    (Since version ) deprecated

  2. def hexTo(databaseName: String, keyName: String, dataToStore: String): Future[Boolean]

    Stores binary data in the local database.

    Stores binary data in the local database.

    Invokes the db_puthex JSON-RPC endpoint.

    returns

    true if the value was stored

    Annotations
    @deprecated
    Deprecated

    (Since version ) deprecated

  3. def stringFrom(databaseName: String, keyName: String): Future[String]

    Obtains a string from the local database.

    Obtains a string from the local database.

    Invokes the db_getstring JSON-RPC endpoint.

    returns

    previously stored value

    Annotations
    @deprecated
    Deprecated

    (Since version ) deprecated

  4. def stringTo(databaseName: String, keyName: String, stringToStore: String): Future[Boolean]

    Stores a string in the local database

    Stores a string in the local database

    Invokes the db_putstring JSON-RPC endpoint.

    returns

    true if the value was stored

    Annotations
    @deprecated
    Deprecated

    (Since version ) deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped