-
remove following obsolete endpoints and references to them:
/users/user/:address/filland/version -
remove refereneces to the following non-existenting endpoints:
/users/:usernameand all ext storage endpoints (begin withapex-api/bloc/file/)
- Fixed the build issue caused by a third-party library
- Fixed the importer submodule
- Made minor fixes to tests
- Updated chain member types
- Removed sync-request dependency in favor of axios
- Made oauthUtil.init an async function
- Expose getContractsContract endpoint
- Expose postContractsXabi endpoint
- Peg typescript version to avoid unexpected issues cause by the module minor updates
- Export type definitions so they are more easily available to TypeScript developers.
- Added
MemberandBalancetypes. - Improved JSDoc types and documentation
- Changed relativePath to be optional in the importer
- Added "codePtr" to the typescript definition of
Chainso that typescript users may now post new chains with code pointers and not receive a Typescript error. - Fixed API debug log output to show correct request and response details.
- Upgraded the Solidity Parser library dependency to remove confusing warnings at runtime that were not in the user's control.
- Added the debugPostParse function to support compilation and static analysis tools
- Added the debugPostAnalyze function to support static analysis tools
- Removed yarn.lock file
- Hotfix for runtime failure due to chai dependency in prod installation
- Production dependencies cleanup
- Updated non-dev dependencies to address security vulnerabilities in production installation
- Hotfix for access token lifetime reserve setting introduced in 8.0.1
- Added the access token lifetime reserve setting to token validity check
- Added basic typescript bindings
- Added VM Debugger support
- Fix issue with
getAccountsandresolveflag - Remove bloc account endpoints and interfaces
- Remove
getBatchStatesfunction call - Update
fillcall to not require username - Fixes for error handling in
compileContracts - Fixes for error handling in
getAccounts - Add js docs
- Added /transaction/parallel endpoint
- Bug fix for createContractList
- Added Bloc /compile endpoint
- Add getAccounts to get the account details
- Add source mappings for minified dist code
- Add babel-preset-minify, remove gulp-uglify
- Fix for util.uid() to always return string value for compatibility with STRATO 5.2+
- Expose searchWithContentRange and searchWithContentRangeUntil
- Fix distributive
- Token-getter updates: no separate config needed - fully mimics the app by following it's config
- Fix for @babel/polyfill dependency
- Pass chainid parameter through getCallArgs and getCreateArgs
- Hotfix for regeneratorRuntime error in oauth.util.js
- Add batch contract state and chain creation functions, as well as expose get{Send,Create,Call}Args functions for generating transaction payloads
- Add external storage endpoints
- Better debug logs formatting
- Generate source maps in build
- Bug fix for chain ID helper for Cirrus queries in api.util.js
- Bug fix for history metadata helper in api.util.js
- Add support for adding custom state in the authorization url
- Add support for resource-owner-password-credential grant flow
- Support overriding config client id and client secret for getAccessTokenByClientSecret
- Make calls to solidity-parser library synchronous
- Implement flatted stringify to remove circular JSON warnings
- Turn on console logger based on config apiDebug flag
- Fixed npm vulnerabilities
- Update token getter to support https
- Make --env flag optional
- Update token getter to display logout button and output env file
- Add pingOauth endpoint
- Disable google translate for token-getter
- Refactor ba-rest to only use oauth
- Output the OAuth sign-in URL to command line when using oauth-client (token-getter)
- Refactor ba-rest to use ES6
- Replace generators with async/await
- Add tests
- Refactor token-getter
- Add build and deploy scripts for npm
- Clean OAuth cookies if access token expired and can't be refreshed
- Search URL should not necessarily contain
/cirrusnow - for STRATO platform internal calls compatibility - Removed old deprecated API and REST wrappers (v4 and earlier)
- Removed the old deprecated Explorer API wrappers
- rest6.getKey now has an option to return other user's account address
- Fix a resolution error introduced in 6.2.12
- VM Selection is provided as well in config.yaml, with precedence given to
optionsparameter in the function call inrest_6. Inrest_5, this is the sole way to select vm. The two options areEVMandSolidVM.
- Support added to sending code to solidvm
- resolveResults() optimization introduced in 6.2.8 is reverted (causing hidden issues)
- Fixed broken logger
- Optimized resolveResults() function in rest5 and rest6
- isTokenValid args list fix
- Conform logger.debug() messages to winston format
- Log API errors
- private chains hotfix
- nodeUrl in config as a preferable way to pass STRATO hostname for oauth
- stratoUrl of oauth config is deprecated and no longer used
- The oauth module now looks for a
tokenFieldsetting in the oauth config to decide which field to use as the access token, in the response received from the oauth server. If this setting is not present, it usesaccess_tokenby default. The other possible value isid_token.
- Added Bloc /details endpoint
- Added options to createChain
util.intToBytes32now processes integers passed as strings correctly and throws an error if can not convert an argument to an integer.
- Client credential OAuth flow implemented
- Hotfix: Requiring
restmodule is deprecated now and imports rest 5 as well asrest5. For rest 6 one needs to explicitly requirerest6
- Audit trail (contract history) functionality added (rest_6 only)
- The wrapper functions arguments are now grouped under one
optionsobject for all the optional args (rest_6 only) - resolve argument is superseded with options.doNotResolve and is now false by default (rest_6 only)
- STRATO API v2.3 support with OAuth-enabled user management replacing the bloc users;
createKey(accessToken)- to create user on the STRATO blockchaingetKey(accessToken)- to get user's addresssendTransactions(..)- the all-in-one function to make transactions of all types- accessToken argument added to all previously existing transaction helper functions
oauthsection expected in the config to use new wrappers
- OAuth flow helper functions;
- OAuth token getter helper utility to fetch OAuth access tokens for easier application deployment;
rest.createChainnow accepts an optional contract name argument beforenode.
- All endpoints are up-to-date with
private-chainfunctionality. - The affected endpoints are:
strato.account: now accepts an array of chainIds.strato.transaction: now accepts a chainId.strato.transactionLast: now accepts a chainId.strato.transactionResult: now accepts a chainId.strato.storage: now accepts a list of chainIds.bloc.contract: now accepts a chainId.bloc.uploadList: now accepts a chainId.bloc.call: now accepts a chainId.bloc.method: now accepts a chainId.bloc.callList: now accepts a chainId.bloc.send: now accepts a chainId.bloc.sendList: now accepts a chainId.bloc.result: now accepts a chainId.bloc.results: now accepts a chainId.bloc.state: now accepts a chainId.bloc.stateVar: now accepts a chainId.
- New endpoints:
strato.chain: takes a list of chainIds, returns a list of ChainInfo.strato.createChain: takes a body, and returns a chainId, if successful.bloc.chain: takes a list of chainIds, returns a list of ChainInfo.bloc.createChain: takes a body, and returns a chainId, if successful.
- New
restmethods:getChainInfo: takes a chainId, returns the ChainInfo associated with that chain.getChainInfos: takes a list of chainIds, returns a list of ChainInfo.createChain: takes a label, a list of members, a list of balances, contract source, and contract arguments, and returns a chainId, if successful.
setLoggeradded. Used to pass a standard logger into blockapps-rest, to replace the debug console output
rest.keystore(user, keyStore)added to wrap/users/{user}/keystore
- rest error response returned as stringified json
- intToBytes32(int) added. Convert int to Bytes32
- getNonce(user, index) added. Return the account's nonce value
- Added function
createTestUser()that creates test users.
assert.shouldThrowRestchecksstatusTexttoo.
rest.getFields()parses arrays. Values returned as strings.
- config printed to stdout only when apiDebug == true
solcmessages properly display new lines
rest.getFields()ignore null value onStateVariableDeclaration
rest.getFields()now parses bothExpressionStatementandStateVariableDeclaration
util.responsehandles rest code 201 properly
importerSolidity imports that start with '/' are treated as relative paths to the project root (process.cwd)
eparser.getFields()reads variable members and their initializers from a contract into a javascript object
common.cwdcontains a platform independent version ofprocess.cwd()asseert.shouldThrowRestadded
- requires Node.js® ^8.0.0
util.uid()andutil.iuid()now use Math.random()
- Gas limit increased to avoid contract-in-a-contract out of gas
/stateVaradds pagination to a/statevariable- varName: the name of the array
- varCount: request the array element count
- varOffset: offset into the array
- varLength: number of elements to retrieve
/statewill throw a 400 when trying to get a large array without pagination
- The unique identifier for searchable contracts is now the contract's code hash, and not the contract's name. This is a breaking change.
isCompile(contractName)is deprecated, useisSearchable(ContractCodeHash)