Packages

c

com.micronautics.web3j

EthereumSynchronous

class EthereumSynchronous extends AnyRef

All of the methods in this class block until a value is ready to be returned to the caller.

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

Instance Constructors

  1. new EthereumSynchronous(web3j: Web3j)

    web3j

    can be shared with EthereumASynchronous

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: 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): 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): 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 at given address

  8. def blockByHash(blockHash: BlockHash, returnFullTransactionObjects: Boolean): 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

  9. def blockByNumber(defaultBlockParameter: DefaultBlockParameter, returnFullTransactionObjects: Boolean = false): Option[Block]
  10. def blockNumber: 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: BlockHash): BigInteger
  12. def blockTransactionCountByNumber(defaultBlockParameter: DefaultBlockParameter): BigInteger
  13. def call(transaction: Transaction, defaultBlockParameter: DefaultBlockParameter): 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): String

    Invokes the eth_getcode JSON-RPC endpoint.

    Invokes the eth_getcode JSON-RPC endpoint.

    returns

    code at a given address

  16. def coinbaseAddress: 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): LLLCompiled

    Invokes the eth_compilelll JSON-RPC endpoint.

    Invokes the eth_compilelll JSON-RPC endpoint.

    returns

    compiled LLL code

  18. def compileSerpent(sourceCode: SerpentSource): SerpentCompiled
  19. def compileSolidity(sourceCode: SoliditySource): Map[String, Code]

    Invokes the eth_compilesolidity JSON-RPC endpoint.

    Invokes the eth_compilesolidity JSON-RPC endpoint.

    returns

    compiled Solidity code

  20. def compilers: 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. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  23. def estimateGas(transaction: Transaction): 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

  24. def filterChangesEth(filterId: FilterId): 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 an empty array if nothing has changed since last poll

  25. def filterChangesShh(filterId: FilterId): 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

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

    Invokes the eth_gasprice JSON-RPC endpoint.

    Invokes the eth_gasprice JSON-RPC endpoint.

    returns

    the current price per gas in wei

  28. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  29. def hasIdentity(identityAddress: Address): 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

  30. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  31. def hashRate(hashRate: String, clientId: String): 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

  32. def hashRate: BigInteger

    Query the hash rate.

    Query the hash rate.

    Invokes the eth_hashrate JSON-RPC endpoint.

    returns

    number of hashes per second that the node is mining at

  33. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  34. def isListening: 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

  35. def isMining: Boolean

    Invokes the eth_mining JSON-RPC endpoint.

  36. def isSyncing: Boolean

    Invokes the eth_syncing JSON-RPC endpoint.

  37. def logs(filterId: FilterId): 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

  38. def logs(ethFilter: EthFilter): 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

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

    Invokes the shh_getmessages JSON-RPC endpoint.

    Invokes the shh_getmessages JSON-RPC endpoint.

    returns

    all Whisper messages matching a filter

  40. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  41. def newBlockFilter: 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

  42. def newFilter(shhFilter: ShhFilter): 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

  43. def newFilter(ethFilter: EthFilter): 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

  44. def newGroup: Address

    New Whisper group.

    New Whisper group.

    Invokes the shh_newgroup JSON-RPC endpoint.

    returns

    address of the new group

  45. def newIdentity: Address

    Invokes the shh_newidentity JSON-RPC endpoint.

    Invokes the shh_newidentity JSON-RPC endpoint.

    returns

    address of the new whisper identity

  46. def newPendingTransactionFilter: FilterId
  47. def nextNonce(address: Address): Nonce

    Get the next available nonce before creating a transaction

  48. def nonce(address: Address, defaultBlockParameter: DefaultBlockParameter): 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

  49. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  50. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  51. def peerCount: BigInteger

    Invokes the net_peercount JSON-RPC endpoint.

    Invokes the net_peercount JSON-RPC endpoint.

    returns

    number of peers currently connected to this client

  52. def post(shhPost: ShhPost): Boolean

    Sends a whisper message.

    Sends a whisper message.

    Invokes the shh_post JSON-RPC endpoint.

    returns

    true if the message was sent

  53. def sendRawTransaction(signedTransactionData: SignedData): 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

  54. def sendTransaction(transaction: Transaction): TransactionHash

    Invokes the eth_sendtransaction JSON-RPC endpoint.

    Invokes the eth_sendtransaction JSON-RPC endpoint.

    returns

    a new contract if the

    Transaction.data
  55. def sha3(data: String): 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

  56. def sign(address: Address, sha3HashOfDataToSign: String): 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

  57. def storageAt(address: Address, position: BigInteger, defaultBlockParameter: DefaultBlockParameter): 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

  58. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  59. def toString(): String
    Definition Classes
    AnyRef → Any
  60. def transactionByBlockHashAndIndex(blockHash: BlockHash, transactionIndex: BigInteger): 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

  61. def transactionByBlockNumberAndIndex(defaultBlockParameter: DefaultBlockParameter, transactionIndex: BigInteger): 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

  62. def transactionByHash(transactionHash: TransactionHash): 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

  63. def transactionReceipt(transactionHash: TransactionHash): 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.)

  64. def uncleByBlockHashAndIndex(blockHash: BlockHash, transactionIndex: BigInteger): 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

  65. def uncleByBlockNumberAndIndex(defaultBlockParameter: DefaultBlockParameter, transactionIndex: BigInteger): 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

  66. def uncleCountByBlockHash(blockHash: BlockHash): 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

  67. def uncleCountByBlockNumber(defaultBlockParameter: DefaultBlockParameter): 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

  68. def uninstallFilter(filterId: FilterId): Boolean

    Uninstalls a filter with given id.

    Uninstalls a filter with 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

  69. def uninstallShhFilter(filterId: FilterId): 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

  70. def versionNet: String

    Invokes the net_version JSON-RPC endpoint.

    Invokes the net_version JSON-RPC endpoint.

    returns

    the current network id

  71. def versionProtocol: String

    Invokes the eth_protocolversion JSON-RPC endpoint.

    Invokes the eth_protocolversion JSON-RPC endpoint.

    returns

    ethereum protocol version used by this client

  72. def versionShh: String

    Invokes the shh_version JSON-RPC endpoint.

    Invokes the shh_version JSON-RPC endpoint.

    returns

    the current whisper protocol version.

  73. def versionWeb3J: String

    Invokes the web3_clientversion JSON-RPC endpoint.

    Invokes the web3_clientversion JSON-RPC endpoint.

    returns

    the Web3J client version used by this client

  74. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  75. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  76. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  77. val web3j: Web3j
  78. def work(nonce: Nonce, headerPowHash: Keccak256Hash, mixDigest: Digest): 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

  79. def work: 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): 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): 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): 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): 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