This repository was archived by the owner on Sep 3, 2019. It is now read-only.
1.0.0 - Breaking Changes! Please Read!
Migrating to 1.0.0
This release brings some changes that will require updates from those using existing Qweb3 versions.
Contracthas been removed from the module exports. You can now create aContractinstance from yourQweb3instance withqweb3.Contract(contractAddress, contractAbi). It will use the same provider set in the Qweb3 instance.Encoderhas been added as part of yourQweb3instance. eg.qweb3.encoder.uintToHex(). But it is also an exported class in the module.Decoderhas been added as part of yourQweb3instance. eg.qweb3.decoder.toQtumAddress(). But it is also an exported class in the module.Utilshas been added as part of yourQweb3instance. eg.qweb3.utils.appendHexPrefix(). But it is also an exported class in the module.Formatterhas been removed and it's functions were merged intoDecoder.Formatter.searchLogOutput() -> Decoder.decodeSearchLog().Formatter. callOutput() -> Decoder.decodeCall()
The Qweb3 constructor now accepts three different types:
URL string- This is the same as before. It will create an HttpProvider for you.HttpProvider- It will accept an HttpProvider instance if ever needed.QryptoRPCProvider- This provider is specifically used in our Qrypto Wallet Chrome Extension. It has limited calling ability torawCallonly.
The purpose of this refactor was meant to ensure compatibility of other Providers like the QryptoRPCProvider.