3.0.0
Fixed8 Fixed8 Everywhere
-
Logging
- Setup logging directed at
stdout
andstderr
. Logging package is loglevel. - Defaults to silent.
- Not exposed through semantic style currently.
- All deprecation messages are set to 'warn' level.
- See logging for more details.
- Setup logging directed at
-
Utils
- Fixed8: A new class extending bignumber.js that replaces all value storage in neon-js
- This class is now used for all classes that involves coin values with decimal places.
- Comes with helper methods such as
toHex
andfromHex
.import {u} from '@cityofzion/neon-js' // accepts numbers or string const num1 = new u.Fixed8(123.4567) const num2 = u.Fixed8.fromHex('0000000005f5e100') // 1 const num3 = num1.add(num2) // immutable console.log(num3.toString()) // '124.4567'
-
Wallet
Claims
is now a ES6 class. While it does not have any spceial methods for it now, it is one of the high level objects that we will be working with inneon-js
. This allows easy creation ofClaims
using the constructor by passing in a CLaims-like javascript object.components
have been created for the minor sub-components found inClaims
andBalance
. These methods are useful for us to rapidly create components that are usable withneon-js
methods. Refer to the wallet section for more information.- BREAKING Excess NEP2 functions are now fully deprecated. The list is
encryptWifAccount
,generateENcryptedWif
,encryptWIF
,decryptWIF
.
-
Transaction
- Update all methods to conform with the new Fixed8 classes. This also means that
neon-js
will not be compatible with just normal javascript objects anymore.
- Update all methods to conform with the new Fixed8 classes. This also means that
-
API
- BREAKING Update external API libraries (neonDB and neoscan) to return
Balance
andClaims
objects. Fixed8 will be used in the new models, making arithmetic operations very different from normal javascript numbers. - A bug has been discovered in
getPrice
. While it works for NEO and GAS, it will not work for any of the NEP5 tokens.getPrices
has been fixed for this bug. However, there is no easy fix forgetPrice
and thus, we will move forward with deprecatinggetPrice
in favor ofgetPrices
.
- BREAKING Update external API libraries (neonDB and neoscan) to return
-
Fixes
- fix getPrices by adding a limit=0 to the query.
- fix default Account.contract field not having the required shape.
- fix transaction attribute being deserialized wrongly.