Package org.web3j.protocol.core
Class JsonRpc2_0Web3j
- java.lang.Object
-
- org.web3j.protocol.core.JsonRpc2_0Web3j
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_BLOCK_TIME
protected Web3jService
web3jService
-
Constructor Summary
Constructors Constructor Description JsonRpc2_0Web3j(Web3jService web3jService)
JsonRpc2_0Web3j(Web3jService web3jService, long pollingInterval, java.util.concurrent.ScheduledExecutorService scheduledExecutorService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Request<?,BooleanResponse>
adminAddPeer(java.lang.String url)
Request<?,AdminDataDir>
adminDataDir()
Request<?,AdminNodeInfo>
adminNodeInfo()
Request<?,AdminPeers>
adminPeers()
Request<?,BooleanResponse>
adminRemovePeer(java.lang.String url)
io.reactivex.Flowable<EthBlock>
blockFlowable(boolean fullTransactionObjects)
Create anFlowable
instance that emits newly created blocks on the blockchain.Request<?,DbGetHex>
dbGetHex(java.lang.String databaseName, java.lang.String keyName)
Request<?,DbGetString>
dbGetString(java.lang.String databaseName, java.lang.String keyName)
Request<?,DbPutHex>
dbPutHex(java.lang.String databaseName, java.lang.String keyName, java.lang.String dataToStore)
Request<?,DbPutString>
dbPutString(java.lang.String databaseName, java.lang.String keyName, java.lang.String stringToStore)
Request<?,EthAccounts>
ethAccounts()
io.reactivex.Flowable<java.lang.String>
ethBlockHashFlowable()
Create an Flowable to emit block hashes.Request<?,EthBlockNumber>
ethBlockNumber()
Request<?,EthCall>
ethCall(Transaction transaction, DefaultBlockParameter defaultBlockParameter)
Request<?,EthChainId>
ethChainId()
Request<?,EthCoinbase>
ethCoinbase()
Request<?,EthCompileLLL>
ethCompileLLL(java.lang.String sourceCode)
Request<?,EthCompileSerpent>
ethCompileSerpent(java.lang.String sourceCode)
Request<?,EthCompileSolidity>
ethCompileSolidity(java.lang.String sourceCode)
Request<?,EthEstimateGas>
ethEstimateGas(Transaction transaction)
Request<?,EthGasPrice>
ethGasPrice()
Request<?,EthGetBalance>
ethGetBalance(java.lang.String address, DefaultBlockParameter defaultBlockParameter)
Request<?,EthBlock>
ethGetBlockByHash(java.lang.String blockHash, boolean returnFullTransactionObjects)
Request<?,EthBlock>
ethGetBlockByNumber(DefaultBlockParameter defaultBlockParameter, boolean returnFullTransactionObjects)
Request<?,EthGetBlockTransactionCountByHash>
ethGetBlockTransactionCountByHash(java.lang.String blockHash)
Request<?,EthGetBlockTransactionCountByNumber>
ethGetBlockTransactionCountByNumber(DefaultBlockParameter defaultBlockParameter)
Request<?,EthGetCode>
ethGetCode(java.lang.String address, DefaultBlockParameter defaultBlockParameter)
Request<?,EthGetCompilers>
ethGetCompilers()
Request<?,EthLog>
ethGetFilterChanges(java.math.BigInteger filterId)
Request<?,EthLog>
ethGetFilterLogs(java.math.BigInteger filterId)
Request<?,EthLog>
ethGetLogs(EthFilter ethFilter)
Request<?,EthGetStorageAt>
ethGetStorageAt(java.lang.String address, java.math.BigInteger position, DefaultBlockParameter defaultBlockParameter)
Request<?,EthTransaction>
ethGetTransactionByBlockHashAndIndex(java.lang.String blockHash, java.math.BigInteger transactionIndex)
Request<?,EthTransaction>
ethGetTransactionByBlockNumberAndIndex(DefaultBlockParameter defaultBlockParameter, java.math.BigInteger transactionIndex)
Request<?,EthTransaction>
ethGetTransactionByHash(java.lang.String transactionHash)
Request<?,EthGetTransactionCount>
ethGetTransactionCount(java.lang.String address, DefaultBlockParameter defaultBlockParameter)
Request<?,EthGetTransactionReceipt>
ethGetTransactionReceipt(java.lang.String transactionHash)
Request<?,EthBlock>
ethGetUncleByBlockHashAndIndex(java.lang.String blockHash, java.math.BigInteger transactionIndex)
Request<?,EthBlock>
ethGetUncleByBlockNumberAndIndex(DefaultBlockParameter defaultBlockParameter, java.math.BigInteger uncleIndex)
Request<?,EthGetUncleCountByBlockHash>
ethGetUncleCountByBlockHash(java.lang.String blockHash)
Request<?,EthGetUncleCountByBlockNumber>
ethGetUncleCountByBlockNumber(DefaultBlockParameter defaultBlockParameter)
Request<?,EthGetWork>
ethGetWork()
Request<?,EthHashrate>
ethHashrate()
io.reactivex.Flowable<Log>
ethLogFlowable(EthFilter ethFilter)
Create an flowable to filter for specific log events on the blockchain.Request<?,EthMining>
ethMining()
Request<?,EthFilter>
ethNewBlockFilter()
Request<?,EthFilter>
ethNewFilter(EthFilter ethFilter)
Request<?,EthFilter>
ethNewPendingTransactionFilter()
io.reactivex.Flowable<java.lang.String>
ethPendingTransactionHashFlowable()
Create an Flowable to emit pending transactions, i.e.Request<?,EthProtocolVersion>
ethProtocolVersion()
Request<?,EthSendTransaction>
ethSendRawTransaction(java.lang.String signedTransactionData)
Request<?,EthSendTransaction>
ethSendTransaction(Transaction transaction)
Request<?,EthSign>
ethSign(java.lang.String address, java.lang.String sha3HashOfDataToSign)
Request<?,EthSubmitHashrate>
ethSubmitHashrate(java.lang.String hashrate, java.lang.String clientId)
Request<?,EthSubmitWork>
ethSubmitWork(java.lang.String nonce, java.lang.String headerPowHash, java.lang.String mixDigest)
Request<?,EthSyncing>
ethSyncing()
Request<?,EthUninstallFilter>
ethUninstallFilter(java.math.BigInteger filterId)
io.reactivex.Flowable<LogNotification>
logsNotifications(java.util.List<java.lang.String> addresses, java.util.List<java.lang.String> topics)
Creates aaFlowable
instance that emits notifications for logs included in new imported blocks.Request<?,NetListening>
netListening()
Request<?,NetPeerCount>
netPeerCount()
Request<?,NetVersion>
netVersion()
BatchRequest
newBatch()
Create a newBatchRequest
.io.reactivex.Flowable<NewHeadsNotification>
newHeadsNotifications()
Creates aFlowable
instance that emits a notification when a new header is appended to a chain, including chain reorganizations.io.reactivex.Flowable<Transaction>
pendingTransactionFlowable()
Create anFlowable
instance to emit all pending transactions that have yet to be placed into a block on the blockchain.io.reactivex.Flowable<EthBlock>
replayPastAndFutureBlocksFlowable(DefaultBlockParameter startBlock, boolean fullTransactionObjects)
Creates aFlowable
instance that emits all blocks from the requested block number to the most current.io.reactivex.Flowable<Transaction>
replayPastAndFutureTransactionsFlowable(DefaultBlockParameter startBlock)
As perWeb3jRx.replayPastAndFutureBlocksFlowable(DefaultBlockParameter, boolean)
, except that all transactions contained within the blocks are emitted.io.reactivex.Flowable<EthBlock>
replayPastBlocksFlowable(DefaultBlockParameter startBlock, boolean fullTransactionObjects)
Creates aFlowable
instance that emits all blocks from the requested block number to the most current.io.reactivex.Flowable<EthBlock>
replayPastBlocksFlowable(DefaultBlockParameter startBlock, boolean fullTransactionObjects, io.reactivex.Flowable<EthBlock> onCompleteFlowable)
Create aFlowable
instance that emits all transactions from the blockchain starting with a provided block number.io.reactivex.Flowable<EthBlock>
replayPastBlocksFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock, boolean fullTransactionObjects)
Create anFlowable
instance that emits all blocks from the blockchain contained within the requested range.io.reactivex.Flowable<EthBlock>
replayPastBlocksFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock, boolean fullTransactionObjects, boolean ascending)
Create anFlowable
instance that emits all blocks from the blockchain contained within the requested range.io.reactivex.Flowable<Transaction>
replayPastTransactionsFlowable(DefaultBlockParameter startBlock)
Creates aFlowable
instance that emits all transactions from the requested block number to the most current.io.reactivex.Flowable<Transaction>
replayPastTransactionsFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock)
Create aFlowable
instance that emits all transactions from the blockchain contained within the requested range.Request<?,ShhAddToGroup>
shhAddToGroup(java.lang.String identityAddress)
Request<?,ShhMessages>
shhGetFilterChanges(java.math.BigInteger filterId)
Request<?,ShhMessages>
shhGetMessages(java.math.BigInteger filterId)
Request<?,ShhHasIdentity>
shhHasIdentity(java.lang.String identityAddress)
Request<?,ShhNewFilter>
shhNewFilter(ShhFilter shhFilter)
Request<?,ShhNewGroup>
shhNewGroup()
Request<?,ShhNewIdentity>
shhNewIdentity()
Request<?,ShhPost>
shhPost(ShhPost shhPost)
Request<?,ShhUninstallFilter>
shhUninstallFilter(java.math.BigInteger filterId)
Request<?,ShhVersion>
shhVersion()
void
shutdown()
Shutdowns a Web3j instance and closes opened resources.io.reactivex.Flowable<Transaction>
transactionFlowable()
Create anFlowable
instance to emit all new transactions as they are confirmed on the blockchain.Request<?,TxPoolStatus>
txPoolStatus()
Request<?,Web3ClientVersion>
web3ClientVersion()
Request<?,Web3Sha3>
web3Sha3(java.lang.String data)
-
-
-
Field Detail
-
DEFAULT_BLOCK_TIME
public static final int DEFAULT_BLOCK_TIME
- See Also:
- Constant Field Values
-
web3jService
protected final Web3jService web3jService
-
-
Constructor Detail
-
JsonRpc2_0Web3j
public JsonRpc2_0Web3j(Web3jService web3jService)
-
JsonRpc2_0Web3j
public JsonRpc2_0Web3j(Web3jService web3jService, long pollingInterval, java.util.concurrent.ScheduledExecutorService scheduledExecutorService)
-
-
Method Detail
-
web3ClientVersion
public Request<?,Web3ClientVersion> web3ClientVersion()
- Specified by:
web3ClientVersion
in interfaceEthereum
-
netVersion
public Request<?,NetVersion> netVersion()
- Specified by:
netVersion
in interfaceEthereum
-
netListening
public Request<?,NetListening> netListening()
- Specified by:
netListening
in interfaceEthereum
-
netPeerCount
public Request<?,NetPeerCount> netPeerCount()
- Specified by:
netPeerCount
in interfaceEthereum
-
adminNodeInfo
public Request<?,AdminNodeInfo> adminNodeInfo()
- Specified by:
adminNodeInfo
in interfaceEthereum
-
adminPeers
public Request<?,AdminPeers> adminPeers()
- Specified by:
adminPeers
in interfaceEthereum
-
adminAddPeer
public Request<?,BooleanResponse> adminAddPeer(java.lang.String url)
- Specified by:
adminAddPeer
in interfaceEthereum
-
adminRemovePeer
public Request<?,BooleanResponse> adminRemovePeer(java.lang.String url)
- Specified by:
adminRemovePeer
in interfaceEthereum
-
adminDataDir
public Request<?,AdminDataDir> adminDataDir()
- Specified by:
adminDataDir
in interfaceEthereum
-
ethProtocolVersion
public Request<?,EthProtocolVersion> ethProtocolVersion()
- Specified by:
ethProtocolVersion
in interfaceEthereum
-
ethChainId
public Request<?,EthChainId> ethChainId()
- Specified by:
ethChainId
in interfaceEthereum
-
ethCoinbase
public Request<?,EthCoinbase> ethCoinbase()
- Specified by:
ethCoinbase
in interfaceEthereum
-
ethSyncing
public Request<?,EthSyncing> ethSyncing()
- Specified by:
ethSyncing
in interfaceEthereum
-
ethHashrate
public Request<?,EthHashrate> ethHashrate()
- Specified by:
ethHashrate
in interfaceEthereum
-
ethGasPrice
public Request<?,EthGasPrice> ethGasPrice()
- Specified by:
ethGasPrice
in interfaceEthereum
-
ethAccounts
public Request<?,EthAccounts> ethAccounts()
- Specified by:
ethAccounts
in interfaceEthereum
-
ethBlockNumber
public Request<?,EthBlockNumber> ethBlockNumber()
- Specified by:
ethBlockNumber
in interfaceEthereum
-
ethGetBalance
public Request<?,EthGetBalance> ethGetBalance(java.lang.String address, DefaultBlockParameter defaultBlockParameter)
- Specified by:
ethGetBalance
in interfaceEthereum
-
ethGetStorageAt
public Request<?,EthGetStorageAt> ethGetStorageAt(java.lang.String address, java.math.BigInteger position, DefaultBlockParameter defaultBlockParameter)
- Specified by:
ethGetStorageAt
in interfaceEthereum
-
ethGetTransactionCount
public Request<?,EthGetTransactionCount> ethGetTransactionCount(java.lang.String address, DefaultBlockParameter defaultBlockParameter)
- Specified by:
ethGetTransactionCount
in interfaceEthereum
-
ethGetBlockTransactionCountByHash
public Request<?,EthGetBlockTransactionCountByHash> ethGetBlockTransactionCountByHash(java.lang.String blockHash)
- Specified by:
ethGetBlockTransactionCountByHash
in interfaceEthereum
-
ethGetBlockTransactionCountByNumber
public Request<?,EthGetBlockTransactionCountByNumber> ethGetBlockTransactionCountByNumber(DefaultBlockParameter defaultBlockParameter)
- Specified by:
ethGetBlockTransactionCountByNumber
in interfaceEthereum
-
ethGetUncleCountByBlockHash
public Request<?,EthGetUncleCountByBlockHash> ethGetUncleCountByBlockHash(java.lang.String blockHash)
- Specified by:
ethGetUncleCountByBlockHash
in interfaceEthereum
-
ethGetUncleCountByBlockNumber
public Request<?,EthGetUncleCountByBlockNumber> ethGetUncleCountByBlockNumber(DefaultBlockParameter defaultBlockParameter)
- Specified by:
ethGetUncleCountByBlockNumber
in interfaceEthereum
-
ethGetCode
public Request<?,EthGetCode> ethGetCode(java.lang.String address, DefaultBlockParameter defaultBlockParameter)
- Specified by:
ethGetCode
in interfaceEthereum
-
ethSign
public Request<?,EthSign> ethSign(java.lang.String address, java.lang.String sha3HashOfDataToSign)
-
ethSendTransaction
public Request<?,EthSendTransaction> ethSendTransaction(Transaction transaction)
- Specified by:
ethSendTransaction
in interfaceEthereum
-
ethSendRawTransaction
public Request<?,EthSendTransaction> ethSendRawTransaction(java.lang.String signedTransactionData)
- Specified by:
ethSendRawTransaction
in interfaceEthereum
-
ethCall
public Request<?,EthCall> ethCall(Transaction transaction, DefaultBlockParameter defaultBlockParameter)
-
ethEstimateGas
public Request<?,EthEstimateGas> ethEstimateGas(Transaction transaction)
- Specified by:
ethEstimateGas
in interfaceEthereum
-
ethGetBlockByHash
public Request<?,EthBlock> ethGetBlockByHash(java.lang.String blockHash, boolean returnFullTransactionObjects)
- Specified by:
ethGetBlockByHash
in interfaceEthereum
-
ethGetBlockByNumber
public Request<?,EthBlock> ethGetBlockByNumber(DefaultBlockParameter defaultBlockParameter, boolean returnFullTransactionObjects)
- Specified by:
ethGetBlockByNumber
in interfaceEthereum
-
ethGetTransactionByHash
public Request<?,EthTransaction> ethGetTransactionByHash(java.lang.String transactionHash)
- Specified by:
ethGetTransactionByHash
in interfaceEthereum
-
ethGetTransactionByBlockHashAndIndex
public Request<?,EthTransaction> ethGetTransactionByBlockHashAndIndex(java.lang.String blockHash, java.math.BigInteger transactionIndex)
- Specified by:
ethGetTransactionByBlockHashAndIndex
in interfaceEthereum
-
ethGetTransactionByBlockNumberAndIndex
public Request<?,EthTransaction> ethGetTransactionByBlockNumberAndIndex(DefaultBlockParameter defaultBlockParameter, java.math.BigInteger transactionIndex)
- Specified by:
ethGetTransactionByBlockNumberAndIndex
in interfaceEthereum
-
ethGetTransactionReceipt
public Request<?,EthGetTransactionReceipt> ethGetTransactionReceipt(java.lang.String transactionHash)
- Specified by:
ethGetTransactionReceipt
in interfaceEthereum
-
ethGetUncleByBlockHashAndIndex
public Request<?,EthBlock> ethGetUncleByBlockHashAndIndex(java.lang.String blockHash, java.math.BigInteger transactionIndex)
- Specified by:
ethGetUncleByBlockHashAndIndex
in interfaceEthereum
-
ethGetUncleByBlockNumberAndIndex
public Request<?,EthBlock> ethGetUncleByBlockNumberAndIndex(DefaultBlockParameter defaultBlockParameter, java.math.BigInteger uncleIndex)
- Specified by:
ethGetUncleByBlockNumberAndIndex
in interfaceEthereum
-
ethGetCompilers
public Request<?,EthGetCompilers> ethGetCompilers()
- Specified by:
ethGetCompilers
in interfaceEthereum
-
ethCompileLLL
public Request<?,EthCompileLLL> ethCompileLLL(java.lang.String sourceCode)
- Specified by:
ethCompileLLL
in interfaceEthereum
-
ethCompileSolidity
public Request<?,EthCompileSolidity> ethCompileSolidity(java.lang.String sourceCode)
- Specified by:
ethCompileSolidity
in interfaceEthereum
-
ethCompileSerpent
public Request<?,EthCompileSerpent> ethCompileSerpent(java.lang.String sourceCode)
- Specified by:
ethCompileSerpent
in interfaceEthereum
-
ethNewFilter
public Request<?,EthFilter> ethNewFilter(EthFilter ethFilter)
- Specified by:
ethNewFilter
in interfaceEthereum
-
ethNewBlockFilter
public Request<?,EthFilter> ethNewBlockFilter()
- Specified by:
ethNewBlockFilter
in interfaceEthereum
-
ethNewPendingTransactionFilter
public Request<?,EthFilter> ethNewPendingTransactionFilter()
- Specified by:
ethNewPendingTransactionFilter
in interfaceEthereum
-
ethUninstallFilter
public Request<?,EthUninstallFilter> ethUninstallFilter(java.math.BigInteger filterId)
- Specified by:
ethUninstallFilter
in interfaceEthereum
-
ethGetFilterChanges
public Request<?,EthLog> ethGetFilterChanges(java.math.BigInteger filterId)
- Specified by:
ethGetFilterChanges
in interfaceEthereum
-
ethGetFilterLogs
public Request<?,EthLog> ethGetFilterLogs(java.math.BigInteger filterId)
- Specified by:
ethGetFilterLogs
in interfaceEthereum
-
ethGetLogs
public Request<?,EthLog> ethGetLogs(EthFilter ethFilter)
- Specified by:
ethGetLogs
in interfaceEthereum
-
ethGetWork
public Request<?,EthGetWork> ethGetWork()
- Specified by:
ethGetWork
in interfaceEthereum
-
ethSubmitWork
public Request<?,EthSubmitWork> ethSubmitWork(java.lang.String nonce, java.lang.String headerPowHash, java.lang.String mixDigest)
- Specified by:
ethSubmitWork
in interfaceEthereum
-
ethSubmitHashrate
public Request<?,EthSubmitHashrate> ethSubmitHashrate(java.lang.String hashrate, java.lang.String clientId)
- Specified by:
ethSubmitHashrate
in interfaceEthereum
-
dbPutString
public Request<?,DbPutString> dbPutString(java.lang.String databaseName, java.lang.String keyName, java.lang.String stringToStore)
- Specified by:
dbPutString
in interfaceEthereum
-
dbGetString
public Request<?,DbGetString> dbGetString(java.lang.String databaseName, java.lang.String keyName)
- Specified by:
dbGetString
in interfaceEthereum
-
dbPutHex
public Request<?,DbPutHex> dbPutHex(java.lang.String databaseName, java.lang.String keyName, java.lang.String dataToStore)
-
dbGetHex
public Request<?,DbGetHex> dbGetHex(java.lang.String databaseName, java.lang.String keyName)
-
shhVersion
public Request<?,ShhVersion> shhVersion()
- Specified by:
shhVersion
in interfaceEthereum
-
shhNewIdentity
public Request<?,ShhNewIdentity> shhNewIdentity()
- Specified by:
shhNewIdentity
in interfaceEthereum
-
shhHasIdentity
public Request<?,ShhHasIdentity> shhHasIdentity(java.lang.String identityAddress)
- Specified by:
shhHasIdentity
in interfaceEthereum
-
shhNewGroup
public Request<?,ShhNewGroup> shhNewGroup()
- Specified by:
shhNewGroup
in interfaceEthereum
-
shhAddToGroup
public Request<?,ShhAddToGroup> shhAddToGroup(java.lang.String identityAddress)
- Specified by:
shhAddToGroup
in interfaceEthereum
-
shhNewFilter
public Request<?,ShhNewFilter> shhNewFilter(ShhFilter shhFilter)
- Specified by:
shhNewFilter
in interfaceEthereum
-
shhUninstallFilter
public Request<?,ShhUninstallFilter> shhUninstallFilter(java.math.BigInteger filterId)
- Specified by:
shhUninstallFilter
in interfaceEthereum
-
shhGetFilterChanges
public Request<?,ShhMessages> shhGetFilterChanges(java.math.BigInteger filterId)
- Specified by:
shhGetFilterChanges
in interfaceEthereum
-
shhGetMessages
public Request<?,ShhMessages> shhGetMessages(java.math.BigInteger filterId)
- Specified by:
shhGetMessages
in interfaceEthereum
-
txPoolStatus
public Request<?,TxPoolStatus> txPoolStatus()
- Specified by:
txPoolStatus
in interfaceEthereum
-
newHeadsNotifications
public io.reactivex.Flowable<NewHeadsNotification> newHeadsNotifications()
Description copied from interface:Web3jRx
Creates aFlowable
instance that emits a notification when a new header is appended to a chain, including chain reorganizations.- Specified by:
newHeadsNotifications
in interfaceWeb3jRx
- Returns:
- a
Flowable
instance that emits a notification for every new header
-
logsNotifications
public io.reactivex.Flowable<LogNotification> logsNotifications(java.util.List<java.lang.String> addresses, java.util.List<java.lang.String> topics)
Description copied from interface:Web3jRx
Creates aaFlowable
instance that emits notifications for logs included in new imported blocks.- Specified by:
logsNotifications
in interfaceWeb3jRx
- Parameters:
addresses
- only return logs from this list of address. Return logs from all addresses if the list is emptytopics
- only return logs that match specified topics. Returns logs for all topics if the list is empty- Returns:
- a
Flowable
instance that emits logs included in new blocks
-
ethBlockHashFlowable
public io.reactivex.Flowable<java.lang.String> ethBlockHashFlowable()
Description copied from interface:Web3jRx
Create an Flowable to emit block hashes.- Specified by:
ethBlockHashFlowable
in interfaceWeb3jRx
- Returns:
- a
Flowable
instance that emits all new block hashes as new blocks are created on the blockchain
-
ethPendingTransactionHashFlowable
public io.reactivex.Flowable<java.lang.String> ethPendingTransactionHashFlowable()
Description copied from interface:Web3jRx
Create an Flowable to emit pending transactions, i.e. those transactions that have been submitted by a node, but don't yet form part of a block (haven't been mined yet).- Specified by:
ethPendingTransactionHashFlowable
in interfaceWeb3jRx
- Returns:
- a
Flowable
instance to emit pending transaction hashes.
-
ethLogFlowable
public io.reactivex.Flowable<Log> ethLogFlowable(EthFilter ethFilter)
Description copied from interface:Web3jRx
Create an flowable to filter for specific log events on the blockchain.- Specified by:
ethLogFlowable
in interfaceWeb3jRx
- Parameters:
ethFilter
- filter criteria- Returns:
- a
Flowable
instance that emits all Log events matching the filter
-
transactionFlowable
public io.reactivex.Flowable<Transaction> transactionFlowable()
Description copied from interface:Web3jRx
Create anFlowable
instance to emit all new transactions as they are confirmed on the blockchain. i.e. they have been mined and are incorporated into a block.- Specified by:
transactionFlowable
in interfaceWeb3jRx
- Returns:
- a
Flowable
instance to emit new transactions on the blockchain
-
pendingTransactionFlowable
public io.reactivex.Flowable<Transaction> pendingTransactionFlowable()
Description copied from interface:Web3jRx
Create anFlowable
instance to emit all pending transactions that have yet to be placed into a block on the blockchain.- Specified by:
pendingTransactionFlowable
in interfaceWeb3jRx
- Returns:
- a
Flowable
instance to emit pending transactions
-
blockFlowable
public io.reactivex.Flowable<EthBlock> blockFlowable(boolean fullTransactionObjects)
Description copied from interface:Web3jRx
Create anFlowable
instance that emits newly created blocks on the blockchain.- Specified by:
blockFlowable
in interfaceWeb3jRx
- Parameters:
fullTransactionObjects
- if true, provides transactions embedded in blocks, otherwise transaction hashes- Returns:
- a
Flowable
instance that emits all new blocks as they are added to the blockchain
-
replayPastBlocksFlowable
public io.reactivex.Flowable<EthBlock> replayPastBlocksFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock, boolean fullTransactionObjects)
Description copied from interface:Web3jRx
Create anFlowable
instance that emits all blocks from the blockchain contained within the requested range.- Specified by:
replayPastBlocksFlowable
in interfaceWeb3jRx
- Parameters:
startBlock
- block number to commence withendBlock
- block number to finish withfullTransactionObjects
- if true, provides transactions embedded in blocks, otherwise transaction hashes- Returns:
- a
Flowable
instance to emit these blocks
-
replayPastBlocksFlowable
public io.reactivex.Flowable<EthBlock> replayPastBlocksFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock, boolean fullTransactionObjects, boolean ascending)
Description copied from interface:Web3jRx
Create anFlowable
instance that emits all blocks from the blockchain contained within the requested range.- Specified by:
replayPastBlocksFlowable
in interfaceWeb3jRx
- Parameters:
startBlock
- block number to commence withendBlock
- block number to finish withfullTransactionObjects
- if true, provides transactions embedded in blocks, otherwise transaction hashesascending
- if true, emits blocks in ascending order between range, otherwise in descending order- Returns:
- a
Flowable
instance to emit these blocks
-
replayPastBlocksFlowable
public io.reactivex.Flowable<EthBlock> replayPastBlocksFlowable(DefaultBlockParameter startBlock, boolean fullTransactionObjects, io.reactivex.Flowable<EthBlock> onCompleteFlowable)
Description copied from interface:Web3jRx
Create aFlowable
instance that emits all transactions from the blockchain starting with a provided block number. Once it has replayed up to the most current block, the provided Flowable is invoked.To automatically subscribe to new blocks, use
Web3jRx.replayPastAndFutureBlocksFlowable(DefaultBlockParameter, boolean)
.- Specified by:
replayPastBlocksFlowable
in interfaceWeb3jRx
- Parameters:
startBlock
- the block number we wish to request fromfullTransactionObjects
- if we require fullTransaction
objects to be provided in theEthBlock
responsesonCompleteFlowable
- a subsequent Flowable that we wish to run once we are caught up with the latest block- Returns:
- a
Flowable
instance to emit all requested blocks
-
replayPastBlocksFlowable
public io.reactivex.Flowable<EthBlock> replayPastBlocksFlowable(DefaultBlockParameter startBlock, boolean fullTransactionObjects)
Description copied from interface:Web3jRx
Creates aFlowable
instance that emits all blocks from the requested block number to the most current. Once it has emitted the most current block, onComplete is called.- Specified by:
replayPastBlocksFlowable
in interfaceWeb3jRx
- Parameters:
startBlock
- the block number we wish to request fromfullTransactionObjects
- if we require fullTransaction
objects to be provided in theEthBlock
responses- Returns:
- a
Flowable
instance to emit all requested blocks
-
replayPastTransactionsFlowable
public io.reactivex.Flowable<Transaction> replayPastTransactionsFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock)
Description copied from interface:Web3jRx
Create aFlowable
instance that emits all transactions from the blockchain contained within the requested range.- Specified by:
replayPastTransactionsFlowable
in interfaceWeb3jRx
- Parameters:
startBlock
- block number to commence withendBlock
- block number to finish with- Returns:
- a
Flowable
instance to emit these transactions in the order they appear in the blocks
-
replayPastTransactionsFlowable
public io.reactivex.Flowable<Transaction> replayPastTransactionsFlowable(DefaultBlockParameter startBlock)
Description copied from interface:Web3jRx
Creates aFlowable
instance that emits all transactions from the requested block number to the most current. Once it has emitted the most current block's transactions, onComplete is called.- Specified by:
replayPastTransactionsFlowable
in interfaceWeb3jRx
- Parameters:
startBlock
- the block number we wish to request from- Returns:
- a
Flowable
instance to emit all requested transactions
-
replayPastAndFutureBlocksFlowable
public io.reactivex.Flowable<EthBlock> replayPastAndFutureBlocksFlowable(DefaultBlockParameter startBlock, boolean fullTransactionObjects)
Description copied from interface:Web3jRx
Creates aFlowable
instance that emits all blocks from the requested block number to the most current. Once it has emitted the most current block, it starts emitting new blocks as they are created.- Specified by:
replayPastAndFutureBlocksFlowable
in interfaceWeb3jRx
- Parameters:
startBlock
- the block number we wish to request fromfullTransactionObjects
- if we require fullTransaction
objects to be provided in theEthBlock
responses- Returns:
- a
Flowable
instance to emit all requested blocks and future
-
replayPastAndFutureTransactionsFlowable
public io.reactivex.Flowable<Transaction> replayPastAndFutureTransactionsFlowable(DefaultBlockParameter startBlock)
Description copied from interface:Web3jRx
As perWeb3jRx.replayPastAndFutureBlocksFlowable(DefaultBlockParameter, boolean)
, except that all transactions contained within the blocks are emitted.- Specified by:
replayPastAndFutureTransactionsFlowable
in interfaceWeb3jRx
- Parameters:
startBlock
- the block number we wish to request from- Returns:
- a
Flowable
instance to emit all requested transactions and future
-
shutdown
public void shutdown()
Description copied from interface:Web3j
Shutdowns a Web3j instance and closes opened resources.
-
newBatch
public BatchRequest newBatch()
Description copied from interface:Batcher
Create a newBatchRequest
.
-
-