Skip to content

Commit

Permalink
Merge branch 'release/v2.16.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
wulfraem committed Jan 8, 2020
2 parents b652646 + 8ee4d8d commit 3d26914
Show file tree
Hide file tree
Showing 95 changed files with 9,102 additions and 5,123 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
bundles
dist
dist-test
docs
libs
node_modules
scripts
**/*.spec.ts
16 changes: 12 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module.exports = {
extends: [
'airbnb-typescript/base',
'plugin:@typescript-eslint/recommended',
'plugin:chai-friendly/recommended',
],
env: {
browser: true,
Expand All @@ -10,14 +12,20 @@ module.exports = {
},
plugins: [
'@typescript-eslint',
'chai-friendly',
],
rules: {
// note you must disable the base rule as it can report incorrect errors
'indent': 'off',
'@typescript-eslint/indent': ['error', 2],
'@typescript-eslint/explicit-function-return-type': ['off'],
'@typescript-eslint/no-explicit-any': ['off'],
'@typescript-eslint/camelcase': ['off'],
'@typescript-eslint/no-empty-interface': ['off'],
},
'@typescript-eslint/no-unused-expressions': ['off'],
'chai-friendly/no-unused-expressions': ['error'],
// rule additions for airbnb
'class-methods-use-this': ['off'], // *may* require further adjustments to instance usage
// exclude cycle dependencies
'import/no-cycle': ['off'],
'no-await-in-loop': ['off'],
'no-restricted-syntax': ['off']
},
};
25 changes: 25 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Lint

on: pull_request

jobs:
eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- uses: actions/setup-node@v1
with:
node-version: 12
- run: rm -f .yarnclean
- run: yarn --frozen-lockfile --ignore-engines --ignore-optional --no-bin-links --non-interactive --silent --ignore-scripts --production=false
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
HUSKY_SKIP_INSTALL: true
# Alternative: if you use npm instead of yarn
# - run: npm ci --no-audit --prefer-offline
- uses: S3bb1/action-eslint@releases/v1
with:
repo-token: ${{secrets.GITHUB_TOKEN}}
check-name: eslint # this is the check name from above 👆 where to post annotations
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
bundles/*
discify/*
dist/*
dist-test/*
docs/_build/*
docs/blockchain/account-store.rst
docs/blockchain/event-hub.rst
docs/blockchain/executor.rst
docs/blockchain/signer.rst
docs/blockchain/signer-internal.rst
docs/common/logger.rst
docs/common/validator.rst
docs/contracts/contract-loader.rst
Expand All @@ -18,3 +19,4 @@ package-lock.json
package-lock.json.*
yarn.lock
.DS_Store
yarn-error.log
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
dist/index.js.js.map
dist-test/*
bundles/bcc/dbcpPath.json
discify/
docs/*
Expand Down
45 changes: 21 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,43 @@ sudo: required

matrix:
include:
- name: "services contracts & digital-twin tests"
- name: "service contracts"
node_js: "11"
env:
- ACCOUNT_MAP='{"0x001De828935e8c7e4cb56Fe610495cAe63fb2612":"01734663843202e2245e5796cb120510506343c67915eb4f9348ac0d8c2cf22a","0x0030C5e7394585400B1FB193DdbCb45a37Ab916E":"7d09c0873e3f8dc0c7282bb7c2ba76bfd432bff53c38ace06193d1e4faa977e7","0x00D1267B27C3A80080f9E1B6Ba01DE313b53Ab58":"a76a2b068fb715830d042ca40b1a4dab8d088b217d11af91d15b972a7afaf202"}'
- TESTSPECS='src/verifications/*.spec.ts src/profile/*.spec.ts src/*.spec.ts src/votings/*.spec.ts src/contracts/digital-twin/*.spec.ts'
- TESTSPECS='src/verifications/*.spec.ts src/profile/*.spec.ts src/*.spec.ts src/votings/*.spec.ts'
- CHAIN_ENDPOINT='ws://localhost:7545'
script:
- npm run testunitcoverage -- --exclude src/name-resolver.spec.ts
- npm run testunitcoverage

- name: "digital-twin tests"
node_js: "11"
env:
- TESTSPECS='src/contracts/digital-twin/*.spec.ts'
- CHAIN_ENDPOINT='ws://localhost:7545'
script:
- npm run testunitcoverage

- name: "data contract & IPFS tests"
- name: "data contract & IPFS tests & did/vc tests"
node_js: "11"
env:
- ACCOUNT_MAP='{"0x001De828935e8c7e4cb56Fe610495cAe63fb2612":"01734663843202e2245e5796cb120510506343c67915eb4f9348ac0d8c2cf22a","0x0030C5e7394585400B1FB193DdbCb45a37Ab916E":"7d09c0873e3f8dc0c7282bb7c2ba76bfd432bff53c38ace06193d1e4faa977e7","0x00D1267B27C3A80080f9E1B6Ba01DE313b53Ab58":"a76a2b068fb715830d042ca40b1a4dab8d088b217d11af91d15b972a7afaf202"}'
- TESTSPECS="src/contracts/data-contract/*.spec.ts src/encryption/*.spec.ts src/dfs/*.spec.ts"
- TESTSPECS="src/contracts/data-contract/*.spec.ts src/encryption/*.spec.ts src/dfs/*.spec.ts src/vc/*.spec.ts src/did/*.spec.ts"
- CHAIN_ENDPOINT='ws://localhost:7545'
script:
- npm run testunitcoverage

- name: "service/base/businesscenter contract tests"
node_js: "11"
env:
- ACCOUNT_MAP='{"0x001De828935e8c7e4cb56Fe610495cAe63fb2612":"01734663843202e2245e5796cb120510506343c67915eb4f9348ac0d8c2cf22a","0x0030C5e7394585400B1FB193DdbCb45a37Ab916E":"7d09c0873e3f8dc0c7282bb7c2ba76bfd432bff53c38ace06193d1e4faa977e7","0x00D1267B27C3A80080f9E1B6Ba01DE313b53Ab58":"a76a2b068fb715830d042ca40b1a4dab8d088b217d11af91d15b972a7afaf202"}'
- TESTSPECS='src/contracts/*.spec.ts src/contracts/base-contract/*.spec.ts src/contracts/business-center/*.spec.ts src/contracts/service-contract/*.spec.ts'
- CHAIN_ENDPOINT='ws://localhost:7545'
script:
- npm run testunitcoverage

services:
- docker

cache:
npm: false
directories:
- docker-cache

services:
- docker

addons:
apt:
Expand All @@ -47,26 +50,20 @@ addons:
- gcc-5
- g++-5


before_install:
- |
filename=docker-cache/saved_images.tar
if [[ -f "$filename" ]]; then docker load < "$filename"; fi
mkdir -p docker-cache
docker pull evannetwork/testcore-snapshot
docker save -o "$filename" evannetwork/testcore-snapshot
- docker pull evannetwork/testcore-snapshot
- git clone https://github.com/evannetwork/testcore-config.git && cd testcore-config
- docker run -d -p 8546:8546 -p 8545:8545 -v /home/travis/build/evannetwork/api-blockchain-core/testcore-config/testcore.json:/root/parity/spec.json -u root evannetwork/testcore-snapshot --chain /root/parity/spec.json --jsonrpc-interface all --unsafe-expose
- export CC="gcc-5" && export CXX="g++-5" && export LINK="gcc-5" && export LINKXX="g++-5"
- npm install -g npm@latest
- cd ..
- git clone https://github.com/trufflesuite/ganache-cli.git && cd ganache-cli && npm install && cd node_modules && rm -rf ganache-core && git clone https://github.com/trufflesuite/ganache-core.git && cd ganache-core && npm i && cd /home/travis/build/evannetwork/api-blockchain-core
- 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
- cd ../../../
- cd ganache-cli && node cli.js --allowUnlimitedContractSize --gasLimit 0xE4E1C0 -p 7545 -f http://localhost:8545 > /dev/null &
- 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The blockchain core is a helper library, that offers helpers for interacting wit


## DApp library
This project is bundled using browserify and directly loadable from dapps within the evan.network. The dbcp.json can be found in this [wrapping project](https://github.com/evannetwork/ui-core/tree/master/dapps/bcc).
This project is bundled using browserify and directly loadable from dapps within the evan.network. The dbcp.json can be found in this [wrapping project](https://github.com/evannetwork/ui-dapps/tree/master/evan-libs/bcc).

It's also available as browserified project within the npm, published with the same original versions: `@evan.network/api-blockchain-core-browserified`.

Expand Down
19 changes: 18 additions & 1 deletion VERSIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@
### Deprecations


## Version 2.16.0
### Features
- add `getPublicKey` implementation to `SignerIdentity`
- add `DidResolver` module for managing DID documents
- add possiblity to instantiate a new `SignerIdentity` in two steps
- can be used to create circular structures if required
- first call constructor, you can omit `config` argument
- when rest (e.g. verifications) has been set up you can call `updateConfig` to finalize `SignerIdenty` instantiation
- add `getService`, `setService` to `DidResolver`

### Fixes
- fix `Container` documentation links and add warning to `ContainerUnshareConfig` documentation
- add interfaces used in exported classes to export list
- update pre-commit hook to use eslint for typescript


## Version 2.15.0
### Features
- add `setContainerShareConfigs` to `Container` API
Expand All @@ -17,6 +33,7 @@
- implement `unPinFileHash` function in dfs
- remove old sharing ipfs hash within `saveSharingsToContract`
- add `signer-identity` for making transactions via identity contract
- add tests for encryption/decryption with identity based profiles

### Fixes
- move `expirationDate` in `formatToV2` to details object
Expand Down Expand Up @@ -244,7 +261,7 @@

### Deprecations
- remove build scripts for browserify bundle
- remove `bcc/bundles/bcc.ts` file and switch to generalized `index.ts` for both, node and ui bundle (ui build job was moved to [ui-core/dapps/bcc](https://github.com/evannetwork/ui-core/tree/master/dapps/bcc))
- remove `bcc/bundles/bcc.ts` file and switch to generalized `index.ts` for both, node and ui bundle (ui build job was moved to [ui-dapps/evan-libs/bcc](https://github.com/evannetwork/ui-dapps/tree/master/evan-libs/bcc))
- add dependency to `RightsAndRoles` to `Profile`


Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ help:
wget -P blockchain -N "$(dbcpDocsUrl)blockchain/account-store.rst"
wget -P blockchain -N "$(dbcpDocsUrl)blockchain/event-hub.rst"
wget -P blockchain -N "$(dbcpDocsUrl)blockchain/executor.rst"
wget -P blockchain -N "$(dbcpDocsUrl)blockchain/signer.rst"
wget -P blockchain -N "$(dbcpDocsUrl)blockchain/signer-internal.rst"
wget -P common -N "$(dbcpDocsUrl)common/logger.rst"
wget -P common -N "$(dbcpDocsUrl)common/validator.rst"
wget -P contracts -N "$(dbcpDocsUrl)contracts/contract-loader.rst"
Expand Down
2 changes: 1 addition & 1 deletion docs/blockchain/executor-agent.rst
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ When wanting to perform a contract creation without a factory contract, this con
.. _source logLogInterface: ../common/logger.html#logloginterface

.. |source signerInterface| replace:: ``SignerInterface``
.. _source signerInterface: ../blockchain/signer.html
.. _source signerInterface: ../blockchain/signer-internal.html

.. |source web3| replace:: ``Web3``
.. _source web3: https://github.com/ethereum/web3.js/
2 changes: 1 addition & 1 deletion docs/blockchain/executor-wallet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ createContract

.. required for building markup
.. |source signerInterface| replace:: ``SignerInterface``
.. _source signerInterface: ../blockchain/signer.html
.. _source signerInterface: ../blockchain/signer-internal.html

.. |source eventHub| replace:: ``EventHub``
.. _source eventHub: ../blockchain/event-hub.html
Expand Down
3 changes: 2 additions & 1 deletion docs/blockchain/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ Blockchain
executor
executor-agent
executor-wallet
signer
signer-internal
signer-identity
account-store
event-hub
name-resolver
Expand Down
Loading

0 comments on commit 3d26914

Please sign in to comment.