Package org.web3j.protocol.rx
Interface Web3jRx
-
- All Known Implementing Classes:
JsonRpc2_0Admin,JsonRpc2_0Web3j
public interface Web3jRxThe Flowables JSON-RPC client event API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description io.reactivex.Flowable<EthBlock>blockFlowable(boolean fullTransactionObjects)Create anFlowableinstance that emits newly created blocks on the blockchain.io.reactivex.Flowable<java.lang.String>ethBlockHashFlowable()Create an Flowable to emit block hashes.io.reactivex.Flowable<Log>ethLogFlowable(EthFilter ethFilter)Create an flowable to filter for specific log events on the blockchain.io.reactivex.Flowable<java.lang.String>ethPendingTransactionHashFlowable()Create an Flowable to emit pending transactions, i.e.io.reactivex.Flowable<LogNotification>logsNotifications(java.util.List<java.lang.String> addresses, java.util.List<java.lang.String> topics)Creates aaFlowableinstance that emits notifications for logs included in new imported blocks.io.reactivex.Flowable<NewHeadsNotification>newHeadsNotifications()Creates aFlowableinstance that emits a notification when a new header is appended to a chain, including chain reorganizations.io.reactivex.Flowable<Transaction>pendingTransactionFlowable()Create anFlowableinstance 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 aFlowableinstance that emits all blocks from the requested block number to the most current.io.reactivex.Flowable<Transaction>replayPastAndFutureTransactionsFlowable(DefaultBlockParameter startBlock)As perreplayPastAndFutureBlocksFlowable(DefaultBlockParameter, boolean), except that all transactions contained within the blocks are emitted.io.reactivex.Flowable<EthBlock>replayPastBlocksFlowable(DefaultBlockParameter startBlock, boolean fullTransactionObjects)Creates aFlowableinstance 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 aFlowableinstance 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 anFlowableinstance 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 anFlowableinstance that emits all blocks from the blockchain contained within the requested range.io.reactivex.Flowable<Transaction>replayPastTransactionsFlowable(DefaultBlockParameter startBlock)Creates aFlowableinstance that emits all transactions from the requested block number to the most current.io.reactivex.Flowable<Transaction>replayPastTransactionsFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock)Create aFlowableinstance that emits all transactions from the blockchain contained within the requested range.io.reactivex.Flowable<Transaction>transactionFlowable()Create anFlowableinstance to emit all new transactions as they are confirmed on the blockchain.
-
-
-
Method Detail
-
ethLogFlowable
io.reactivex.Flowable<Log> ethLogFlowable(EthFilter ethFilter)
Create an flowable to filter for specific log events on the blockchain.- Parameters:
ethFilter- filter criteria- Returns:
- a
Flowableinstance that emits all Log events matching the filter
-
ethBlockHashFlowable
io.reactivex.Flowable<java.lang.String> ethBlockHashFlowable()
Create an Flowable to emit block hashes.- Returns:
- a
Flowableinstance that emits all new block hashes as new blocks are created on the blockchain
-
ethPendingTransactionHashFlowable
io.reactivex.Flowable<java.lang.String> ethPendingTransactionHashFlowable()
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).- Returns:
- a
Flowableinstance to emit pending transaction hashes.
-
transactionFlowable
io.reactivex.Flowable<Transaction> transactionFlowable()
Create anFlowableinstance to emit all new transactions as they are confirmed on the blockchain. i.e. they have been mined and are incorporated into a block.- Returns:
- a
Flowableinstance to emit new transactions on the blockchain
-
pendingTransactionFlowable
io.reactivex.Flowable<Transaction> pendingTransactionFlowable()
Create anFlowableinstance to emit all pending transactions that have yet to be placed into a block on the blockchain.- Returns:
- a
Flowableinstance to emit pending transactions
-
blockFlowable
io.reactivex.Flowable<EthBlock> blockFlowable(boolean fullTransactionObjects)
Create anFlowableinstance that emits newly created blocks on the blockchain.- Parameters:
fullTransactionObjects- if true, provides transactions embedded in blocks, otherwise transaction hashes- Returns:
- a
Flowableinstance that emits all new blocks as they are added to the blockchain
-
replayPastBlocksFlowable
io.reactivex.Flowable<EthBlock> replayPastBlocksFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock, boolean fullTransactionObjects)
Create anFlowableinstance that emits all blocks from the blockchain contained within the requested range.- Parameters:
startBlock- block number to commence withendBlock- block number to finish withfullTransactionObjects- if true, provides transactions embedded in blocks, otherwise transaction hashes- Returns:
- a
Flowableinstance to emit these blocks
-
replayPastBlocksFlowable
io.reactivex.Flowable<EthBlock> replayPastBlocksFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock, boolean fullTransactionObjects, boolean ascending)
Create anFlowableinstance that emits all blocks from the blockchain contained within the requested range.- 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
Flowableinstance to emit these blocks
-
replayPastBlocksFlowable
io.reactivex.Flowable<EthBlock> replayPastBlocksFlowable(DefaultBlockParameter startBlock, boolean fullTransactionObjects, io.reactivex.Flowable<EthBlock> onCompleteFlowable)
Create aFlowableinstance 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
replayPastAndFutureBlocksFlowable(DefaultBlockParameter, boolean).- Parameters:
startBlock- the block number we wish to request fromfullTransactionObjects- if we require fullTransactionobjects to be provided in theEthBlockresponsesonCompleteFlowable- a subsequent Flowable that we wish to run once we are caught up with the latest block- Returns:
- a
Flowableinstance to emit all requested blocks
-
replayPastBlocksFlowable
io.reactivex.Flowable<EthBlock> replayPastBlocksFlowable(DefaultBlockParameter startBlock, boolean fullTransactionObjects)
Creates aFlowableinstance that emits all blocks from the requested block number to the most current. Once it has emitted the most current block, onComplete is called.- Parameters:
startBlock- the block number we wish to request fromfullTransactionObjects- if we require fullTransactionobjects to be provided in theEthBlockresponses- Returns:
- a
Flowableinstance to emit all requested blocks
-
replayPastTransactionsFlowable
io.reactivex.Flowable<Transaction> replayPastTransactionsFlowable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock)
Create aFlowableinstance that emits all transactions from the blockchain contained within the requested range.- Parameters:
startBlock- block number to commence withendBlock- block number to finish with- Returns:
- a
Flowableinstance to emit these transactions in the order they appear in the blocks
-
replayPastTransactionsFlowable
io.reactivex.Flowable<Transaction> replayPastTransactionsFlowable(DefaultBlockParameter startBlock)
Creates aFlowableinstance 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.- Parameters:
startBlock- the block number we wish to request from- Returns:
- a
Flowableinstance to emit all requested transactions
-
replayPastAndFutureBlocksFlowable
io.reactivex.Flowable<EthBlock> replayPastAndFutureBlocksFlowable(DefaultBlockParameter startBlock, boolean fullTransactionObjects)
Creates aFlowableinstance 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.- Parameters:
startBlock- the block number we wish to request fromfullTransactionObjects- if we require fullTransactionobjects to be provided in theEthBlockresponses- Returns:
- a
Flowableinstance to emit all requested blocks and future
-
replayPastAndFutureTransactionsFlowable
io.reactivex.Flowable<Transaction> replayPastAndFutureTransactionsFlowable(DefaultBlockParameter startBlock)
As perreplayPastAndFutureBlocksFlowable(DefaultBlockParameter, boolean), except that all transactions contained within the blocks are emitted.- Parameters:
startBlock- the block number we wish to request from- Returns:
- a
Flowableinstance to emit all requested transactions and future
-
newHeadsNotifications
io.reactivex.Flowable<NewHeadsNotification> newHeadsNotifications()
Creates aFlowableinstance that emits a notification when a new header is appended to a chain, including chain reorganizations.- Returns:
- a
Flowableinstance that emits a notification for every new header
-
logsNotifications
io.reactivex.Flowable<LogNotification> logsNotifications(java.util.List<java.lang.String> addresses, java.util.List<java.lang.String> topics)
Creates aaFlowableinstance that emits notifications for logs included in new imported blocks.- 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
Flowableinstance that emits logs included in new blocks
-
-