Skip to content

Commit

Permalink
Merge branch 'release/v2.17.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
wulfraem committed Feb 10, 2020
2 parents e8d007d + 96035ce commit f1d9707
Show file tree
Hide file tree
Showing 34 changed files with 3,208 additions and 268 deletions.
40 changes: 34 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,39 @@ before_install:
- cd ..
- npm i -g ganache-cli
install:
- cd /home/travis/build/evannetwork/api-blockchain-core
- npm install
- rm -rf node_modules/@evan.network/dbcp && git clone https://github.com/evannetwork/dbcp.git ../dbcp && cd ../dbcp && git checkout develop && npm i && npm run build && cd ../api-blockchain-core && mv ../dbcp ./node_modules/@evan.network
- cd node_modules/@evan.network && rm -rf smart-contracts-core && git clone https://github.com/evannetwork/smart-contracts-core.git && cd smart-contracts-core && git checkout develop && npm i && node ./scripts/build-contracts.js
- ganache-cli --allowUnlimitedContractSize --gasLimit 0xE4E1C0 -p 7545 -f http://localhost:8545 > /dev/null &
- cd /home/travis/build/evannetwork/api-blockchain-core
- |
cd /home/travis/build/evannetwork/api-blockchain-core
npm install
rm -rf node_modules/@evan.network/dbcp
git clone https://github.com/evannetwork/dbcp.git ../dbcp
cd ../dbcp
exists=`git show-ref refs/remotes/origin/$TRAVIS_PULL_REQUEST_BRANCH`
if [ -n "$exists" ]; then
echo 'branch "$TRAVIS_PULL_REQUEST_BRANCH" exists on dbcp, checking out'
git checkout "$TRAVIS_PULL_REQUEST_BRANCH"
else
echo 'branch "$TRAVIS_PULL_REQUEST_BRANCH" not exists on dbcp, checking out develop'
git checkout develop
fi
npm i
npm run build
cd ../api-blockchain-core
mv ../dbcp ./node_modules/@evan.network
cd node_modules/@evan.network
rm -rf smart-contracts-core
git clone https://github.com/evannetwork/smart-contracts-core.git
cd smart-contracts-core
exists=`git show-ref refs/remotes/origin/$TRAVIS_PULL_REQUEST_BRANCH`
if [ -n "$exists" ]; then
echo 'branch "$TRAVIS_PULL_REQUEST_BRANCH" exists on smart-contracts-core, checking out'
git checkout "$TRAVIS_PULL_REQUEST_BRANCH"
else
echo 'branch "$TRAVIS_PULL_REQUEST_BRANCH" not exists on smart-contracts-core, checking out develop'
git checkout develop
fi
npm i
node ./scripts/build-contracts.js
ganache-cli --allowUnlimitedContractSize --gasLimit 0xE4E1C0 -p 7545 -f http://localhost:8545 > /dev/null &
cd /home/travis/build/evannetwork/api-blockchain-core
after_success:
- bash <(curl -s https://codecov.io/bash) -cF javascript
26 changes: 24 additions & 2 deletions VERSIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,36 @@

## Next Version
### Features
- add support for identity based accounts to `KeyExchange`, `Sharing` and `Profile` modules
- update test setup to support identity based accounts

### Fixes

### Deprecations


## Version 2.17.0
### Features
- add support for identity based accounts to `KeyExchange`, `Sharing` and `Profile` modules
- update test setup to support identity based accounts
- adding DID generation upon onboarding
- allow `plugins` property within `DigitalTwin.create` to create initial containers
- add `DigitalTwin.exportAsTemplate` to copy a existing twin configuration
- ensure `DigitalTwin` and `Container` description to use at least `dbcpVersion` 2
- update root verification handling to use genesis account
- add lookup method for an identity's owner's address
- add deactivation mechanism for twins
- add `signer-identity` to enable identity to getGasPrice using underlying account
- add `setVerificationAndVc` function to enable VC creation for verification
- update `Verifications` logic and tests to support identity based account


### Fixes
- use typescript version `3.7.4`
- fix behavior of `DataContract` for unencrypted data
- fix did public key handling to properly support proofs
- add checks for configured identity and account to prevent unintentional usage of active identity
- add support for custom DID registries for DID tests


## Version 2.16.0
### Features
- add `getPublicKey` implementation to `SignerIdentity`
Expand Down
32 changes: 32 additions & 0 deletions docs/blockchain/signer-identity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,38 @@ Example
------------------------------------------------------------------------------

.. _signerIdentity_getGasPrice:

getGasPrice
===================

.. code-block:: javascript
signer.getGasPrice();
get gas price (either from config or from api.eth.web3.eth.gasPrice (gas price median of last blocks) or api.config.eth.gasPrice; unset config value or set it to falsy for median gas price

-------
Returns
-------

``string``: hex string with gas price.

-------
Example
-------

.. code-block:: javascript
const gasPrice = await signer.getGasPrice();
// returns 0x2e90edd000
------------------------------------------------------------------------------



.. required for building markup
.. |source contractLoader| replace:: ``ContractLoader``
Expand Down
79 changes: 78 additions & 1 deletion docs/contracts/data-contract.rst
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ Example
--------------------------------------------------------------------------------



= Entries =
===========

Expand Down Expand Up @@ -917,6 +916,84 @@ Example
dataContract.clearSharings();
--------------------------------------------------------------------------------

.. _data-contract_unpinFileHash:

unpinFileHash
================================================================================

.. code-block:: typescript
dataContract.unpinFileHash(hash);
Removes a file hash from the DFS.

----------
Parameters
----------

#. ``hash`` - ``string``: reference to the DFS file, which can be either an IPFS or a bytes32 hash

-------
Returns
-------

``Promise`` returns ``void``: resolved when done

-------
Example
-------

.. code-block:: typescript
const descriptionHash = await this.options.executor.executeContractCall(
myDataContract,
'contractDescription',
);
await this.options.dataContract.unpinFileHash(descriptionHash);
--------------------------------------------------------------------------------

.. _data-contract_getDfsContent:

getDfsContent
================================================================================

.. code-block:: typescript
dataContract.getDfsContent(hash);
Gets a file's content from the DFS.

----------
Parameters
----------

#. ``hash`` - ``string``: reference to the DFS file, which can be either an IPFS or a bytes32 hash

-------
Returns
-------

``Promise`` returns ``Buffer``: the content of the retrieved file

-------
Example
-------

.. code-block:: typescript
const descriptionHash = await this.options.executor.executeContractCall(
myDataContract,
'contractDescription',
);
const descriptionContent = (await this.options.dataContract.getDfsContent(descriptionHash)).toString('binary');
const description = JSON.parse(
descriptionContent,
);
.. required for building markup
Expand Down
Loading

0 comments on commit f1d9707

Please sign in to comment.