Releases: CityOfZion/neon-js
Releases · CityOfZion/neon-js
Dark Magician
-
API
API is now extracted into its own package under
neon-api
. The core functionalities offered by this package are high level API methods and 3rd party endpoint calls.- Managed API methods now require an API provider under the property
api
. This API provider will be used as the main source for data retrieval. - The properties
net
,address
andprivateKey
is now deprecated. Please useapi
to denote the specific network and provider you wish to use andaccount
to replaceaddress
andprivateKey
. - The
Provider
interface is now a wrapper for each API provider. sendFromSmartContract
is now a string property that is the scripthash of the smart contract that you are manipulating.- Removed NEP5 methods from API. They now live in the
neon-nep5
package. - Removed
cmc
from API.
- Managed API methods now require an API provider under the property
-
NEP5
NEP5 is now extracted into its own package under
neon-nep5
. The core functionalities offered by this package are high level common functions and ABI script functions.- ABI functions are available to easily create scripts for each documented NEP5 function.
- Change output of
getTokenBalances
to output a dictionary of symbols to Fixed8 instead of symbols to numbers.
-
Core
neon-core
forms the base package and contains all the modules required for interaction with the blockchain.-
Utility
- Methods outputting arrayBuffers are now standardised to output UInt8Arrays.
- bignumber.js package is updated to 7.2 which contains breaking changes. Fixed8 now implements some of the common aliases (ceil, floor, equals, round) but not all changes are covered.
-
Wallet
- All components are now ES6 classes (AssetBalance, ClaimItem, Coin).
- Changed message signing API to not perform any message transformation (previously it assumed input was ASCII and converted it to hex). This was done so all signing methods can rely on the same underlying methods (be it message or transaction signing).
- Encryption and decryption is now fully async.
- Add support for multi-sig Account creation through
Account.createMultiSig
.
-
Transaction
- All components are now ES6 classes (TransactionAttribute, TransactionInput, TransactionOutput, Witness).
- Individual transaction types are now ES6 classes.
Transaction
class is now a static class helper.- Add support for multi-sig signature through
Witness.buildMultiSig
.
-
Smart Contract
- Add
StackItem
class.
- Add
-
RPC
- Overhaul parsers. Use
BuildParser
(replaces VMZip) to build a list of parsers to parse the results. - Included several common parsers to use.
- Overhaul parsers. Use
-
Emergency Teleport
-
Wallet
- Add multi-sig support through
Account.createMultiSig
.
- Add multi-sig support through
-
Transaction
- Add multi-sig support through
Witness.buildMultiSig
.
- Add multi-sig support through
The Forceful Sentry
-
Fixes
- Adjust default timeout for rpc calls to 30s from 5s.
Delinquent Duo
-
API
getTokenBalances
to retrieve multiple token balances for a single address within a single HTTP call.setupVote
is a new method that allows you to setup your voting status for your neo.
const config = { net: 'TestNet', account: new wallet.Account(privateKey), candidateKeys: [key1, key2] // Keys retrieved from a getValidators call. } Neon.api.setupVote(config)
-
RPC
getvalidators
call added. This call returns the list of possible candidates as well as their current vote tally.
-
Wallet
verifySignature
as the counterpart togenerateSignature
. This makes it possible to verify signatures of pure hexstrings.- State Transaction support is added.
-
Website
- Redirect static package to use unpkg. This will serve the latest browser.js that is published.
Call of the Haunted
-
Fixes
- Change default return value of contract in deployContract to ff00
- Fix bug in
getRPCEndpoint
where we drop the list when finding a new best height - Fix bug in
getRPCEndpoint
where a rejected promise was ending the Promise.race - Remove neonDB tests
Premature Burial
-
Fixes
- Added
sendingFromSmartContract
for claimGas.
- Added
Snatch Steal
-
Smart Contract
- Add Runtime.Deserialize logic. This is the deserialization logic found in the VM.
import {sc} from '@cityofzion/neon-js' sc.deserialize('800200126d65737361676520746f206d7973656c66210204438ffc5a')
-
Fixes
- All class constructors now accept optional parameters. This means that all classes should be easily instantiated with defaults if required.
- Update dump logic for managed methods to dump fees.
Giant Trunade
-
Fixes
- Typings update
Heavy Storm
-
Transactions
- Transactions now support attaching fees
-
API
- Neoscan
getTransactionHistory
is updated to use a paginated endpoint. It currently only supports a single page but it should speed up loading by a significant amount. The downside is that it will not return the full history.
- Neoscan
-
Fixes
getRPCEndpoint
is adjusted to also return RPCs that are only 1 block behind the best height. This reduces the load on a single RPC on the chance that only 1 endpoint has the best height. This should increase RPC reliability while not sacrificing too much in terms of information.
Lonefire Blossom
-
Fixes
- Fix scriptBuilder to ScriptParams error parsing nonce
- Use generateRandomArray in attachAttributes
- Fix timeout setting for api calls
- Correct semantic API for verify
- Typings update