Releases: hyperledger-web3j/web3j
v2.0.1
Transaction managers and event wrappers (v2.0.0-android)
See v2.0.0 for release notes.
Transaction managers and event wrappers (v2.0.0)
This milestone release incorporates a number of key features:
Transaction managers
Transaction managers allow you to choose how you transact with Ethereum clients via web3j's smart contract wrappers. For instance, you can now choose if you wish to have web3j sign your transactions, or the Ethereum client that you submit the transaction to the network via. You can also specify the chain id as per EIP-155 to prevent replay of transactions.
This also simplifies working with other Ethereum platforms such Quorum via web3j-quorum, which works natively with web3j 2.0+ generated smart contract wrappers, with full transaction privacy support.
A fast transaction manager has also been created to facilitate sending multiple raw transactions per block.
Thanks to ferOnti for all of his input on working with higher throughput transactions.
Reactive, typed events
Events in generated smart contracts wrappers are now fully typed. E.g. in the ERC20 smart contract wrappers, you have the following event definition:
event Transfer(address indexed _from, address indexed _to, uint256 _value);
You now have the following event object type in the corresponding smart contract wrapper Java code:
public static class TransferEventResponse {
public Address _from;
public Address _to;
public Uint256 _value;
}
You can then get details of those events via the transaction receipt:
public List<TransferEventResponse> getTransferEvents(TransactionReceipt transactionReceipt)
Or get an Observable that creates a filter providing events as they happen on the blockchain:
public Observable<TransferEventResponse> transferEventObservable()
See HumanStandardToken for further details.
Thanks to @tramonex-nate for this great enhancement.
Default values
Default values are now available on all Solidity types. E.g. if you wish to provide an empty value to a smart contract wrapper, use <Type>.DEFAULT.
Thanks to @thedoctor who provided this change.
Versioning
web3j jars now contain details of the build version. You can query this from your code via the Version class.
The version is now provided with the web3j command line tools, which incidentally are now available on Homebrew.
$ brew tap web3j/web3j
$ brew install web3j
$ web3j version
_ _____ _ _
| | |____ (_) (_)
__ _____| |__ / /_ _ ___
\ \ /\ / / _ \ '_ \ \ \ | | | / _ \
\ V V / __/ |_) |.___/ / | _ | || (_) |
\_/\_/ \___|_.__/ \____/| |(_)|_| \___/
_/ |
|__/
Version: 2.0.0
Build timestamp: 2017-02-10 06:45:22.537 UTC
Light wallet generation
For working with resource constrained devices such as smartphones, web3j now provides two types of wallet file generation, full and light. Previously only the full generation was available. Running a simple benchmark locally, full wallet files can be generated in ~700 msecs, versus ~50 msecs for light.
See the WalletUtils class for more information.
Breaking changes
The Contract class has been migrated to the tx package along with the TransactionManager components.
Block and Transaction responses from Ethereum clients are no longer contained within an optional. This is to reduce the number of Optional.get() calls that were required when working with the Future and Observable APIs.
Bug fixes
v1.1.2 The IPC Release
Provides IpcService for connecting to Ethereum clients over IPC for *nix based OS's.
Contains a number of bug fixes & pull requests submitted by the community.
Update web3j command line tools are now available via Homebrew of OS X users:
brew tap web3j/web3j
brew install web3j
v1.1.1
This release contains a fix for the following issue:
Additionally web3j-tests.jar artifacts are now being published to Maven/JFrog.
web3j goes reactive (v1.1.0-android)
See v1.1.0 for release notes.
web3j goes reactive (v1.1.0)
This milestone release provides a couple of significant new features to web3j.
Firstly the JSON-RPC client API has been enhanced to integrate with RxJava's Observables. In addition to web3j.< methodName >.[ send() | sendAsync ], you also have observable() which will wrap the request in an observable, allowing straight forwards composition of JSON-RPC calls.
Secondly is the addition of web3j's filter API. web3j provides a fully asynchronous API for working with Ethereum client filters, so you no longer need to poll the client for filter updates. For instance, receiving a callback with all new blocks or transactions being created in Ethereum is very trivial. For more details refer to the new Filters and Events section in the documentation.
v1.0.9-android
This release addresses issues with the Apache HttpClient on Android.
See here for details of core web3j changes.
v1.0.9
v1.0.8-android
See v1.0.8 for release notes.