- 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
tokenField
setting 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_token
by default. The other possible value isid_token
.
- Added Bloc /details endpoint
- Added options to createChain
util.intToBytes32
now 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
rest
module 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
options
object 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
oauth
section 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.createChain
now accepts an optional contract name argument beforenode
.
- All endpoints are up-to-date with
private-chain
functionality. - 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
rest
methods: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.
setLogger
added. 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.shouldThrowRest
checksstatusText
too.
rest.getFields()
parses arrays. Values returned as strings.
- config printed to stdout only when apiDebug == true
solc
messages properly display new lines
rest.getFields()
ignore null value onStateVariableDeclaration
rest.getFields()
now parses bothExpressionStatement
andStateVariableDeclaration
util.response
handles rest code 201 properly
importer
Solidity 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.cwd
contains a platform independent version ofprocess.cwd()
asseert.shouldThrowRest
added
- 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
/stateVar
adds pagination to a/state
variable- varName: the name of the array
- varCount: request the array element count
- varOffset: offset into the array
- varLength: number of elements to retrieve
/state
will 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)