Skip to content

Commit

Permalink
Merge branch 'release/v2.13.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
wulfraem committed Oct 8, 2019
2 parents a0e2578 + 4e1e737 commit 7ac4263
Show file tree
Hide file tree
Showing 76 changed files with 928 additions and 859 deletions.
8 changes: 8 additions & 0 deletions VERSIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
### Deprecations


## Version 2.13.0
### Features
- add `setProfileProperties` and `getProfileProperties`

### Fixes
- remove custom agpl appendix


## Version 2.12.0
### Features
- add generic support for preparing and executing transactions via identity
Expand Down
57 changes: 40 additions & 17 deletions docs/profile/verifications.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Verifications
================================================================================

.. list-table::
.. list-table::
:widths: auto
:stub-columns: 1

Expand Down Expand Up @@ -45,7 +45,7 @@ Under this "path" a set of values can be found. These value describe the verific
- 0: Issued
- 1: Confirmed
- ``signature``
Signature which is the proof that the verification issuer issued a verification of topic for this identity.
Signature which is the proof that the verification issuer issued a verification of topic for this identity.
It MUST be a signed message of the following structure: keccak256(address identityHolder_address, uint256 _ topic, bytes data)
- ``creationDate``
creationDate of the verification
Expand Down Expand Up @@ -105,7 +105,7 @@ Example
-------

.. code-block:: typescript
const verifications = new Verifications({
accountStore,
config,
Expand Down Expand Up @@ -255,6 +255,8 @@ setVerification
Sets or creates a verification; this requires the issuer to have permissions for the parent verification (if verification name seen as a path, the parent 'folder').
The "verificationValue" field can also be set to a custom JSON object with any data. For example DID, VC's, documents or any other custom value you want to attach to the verification.
----------
Parameters
----------
Expand Down Expand Up @@ -282,9 +284,30 @@ Example
// accounts[0] issues verification '/company' for accounts[1]
const firstVerification = await verifications.setVerification(accounts[0], accounts[1], '/company');
// accounts[0] issues verification '/companyData' for accounts[1] with additional data attached
const secondVerification = await verifications.setVerification(accounts[0], accounts[1], '/companyData', 0, {
additionalDocument: <binary buffer>
vcDid: {
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1"
],
"id": "http://example.edu/credentials/3732",
"type": ["VerifiableCredential", "UniversityDegreeCredential"],
"credentialSubject": {
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
"degree": {
"type": "BachelorDegree",
"name": "Bachelor of Science and Arts"
}
},
"proof": { }
}
});
// accounts[0] issues verification '/company' for accounts[1], sets an expiration date
// and links to description domain 'sample'
const secondVerification = await verifications.setVerification(
const thirdVerification = await verifications.setVerification(
accounts[0], accounts[1], '/company', expirationDate, verificationValue, 'example');
Expand All @@ -308,13 +331,13 @@ Parameters
#. ``subject`` - ``string``: subject of the verifications
#. ``topic`` - ``string``: name (/path) of a verification
#. ``isIdentity`` - ``string`` (optional): indicates if the subject is already an identity
#. ``isIdentity`` - ``string`` (optional): indicates if the subject is already an identity
-------
Returns
-------
``Promise`` returns ``any[]``: verification info array,
``Promise`` returns ``any[]``: verification info array,
Verifications have the following properties:
Expand Down Expand Up @@ -408,7 +431,7 @@ Example
const nestedVerifications = await getNestedVerifications('0x123...', '/test')
// will return
// will return
[
{
// creator of the verification
Expand Down Expand Up @@ -793,7 +816,7 @@ rejectVerification
verifications.rejectVerification(accountId, subject, verificationId[, rejectReason, isIdentity]);
Reject a Verification. This verification will be marked as rejected but not deleted. This is important for tracking reasons. You can also optionally add a reject reason as JSON object to track additional informations about the rejection. Issuer and Subject can reject a special verification.
Reject a Verification. This verification will be marked as rejected but not deleted. This is important for tracking reasons. You can also optionally add a reject reason as JSON object to track additional informations about the rejection. Issuer and Subject can reject a special verification.
----------
Parameters
Expand Down Expand Up @@ -981,7 +1004,7 @@ Parameters
----------
#. ``contract`` - ``any``: target contract of transcation or ``null`` if just sending funds
#. ``functionName`` - ``string``: function for transaction or ``null`` if just sending funds
#. ``functionName`` - ``string``: function for transaction or ``null`` if just sending funds
#. ``options`` - ``any``: options for transaction, supports from, to, nonce, input, value
#. ``args`` - ``any[]`` (optional): arguments for function transaction
Expand Down Expand Up @@ -1156,7 +1179,7 @@ getVerificationEnsAddress
verifications.getVerificationEnsAddress(topic);
Map the topic of a verification to it's default ens domain.
----------
Parameters
----------
Expand Down Expand Up @@ -1192,7 +1215,7 @@ ensureVerificationDescription
verifications.ensureVerificationDescription(verification);
Gets and sets the default description for a verification if it does not exists.
----------
Parameters
----------
Expand Down Expand Up @@ -1399,7 +1422,7 @@ VerificationsStatusFlagsV2
--------------------------
status annotations about verification, depending on defined ``VerificationsQueryOptions``, this may lead to the verification to be invalid or less trustworthy
#. ``disableSubVerifications``: parent verification does not allow subverifications
#. ``expired``: verification has expired
#. ``invalid``: signature does not match requirements, this could be because it hasn’t been signed by correct account or underlying checksum does not match subject, topic and data
Expand Down Expand Up @@ -1501,11 +1524,11 @@ a single verification; usually used in ``VerificationsResultV2``
* ``subjectIdentity`` - ``string``: identity (contract or identity hash) of subject
* ``subjectType`` - ``string``: type of subject (account/contract)
* ``topic`` - ``string``: topic of identity (name)
* ``data`` - ``any`` (optional): 32B data hash string of identity
* ``description`` - ``any`` (optional): only if actually set
* ``expirationDate`` - ``number`` (optional): expiration date of verification (js timestamp)
* ``rejectReason`` - ``string`` (optional): if applicable, reason for verification rejection
* ``status`` - ``VerificationsStatusV2`` (optional): status of verification, is optional during result computation and required when done
* ``data`` - ``any`` (optional): 32B data hash string of identity
* ``description`` - ``any`` (optional): only if actually set
* ``expirationDate`` - ``number`` (optional): expiration date of verification (js timestamp)
* ``rejectReason`` - ``string`` (optional): if applicable, reason for verification rejection
* ``status`` - ``VerificationsStatusV2`` (optional): status of verification, is optional during result computation and required when done
* ``subject`` - ``string`` (optional): subject accountId/contractId (if query was issued with ``isIdentity`` set to ``false``)
#. ``raw`` (optional): raw data about verification from contract
* ``creationBlock`` - ``string``: block in which verification was issued
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"author": "evan GmbH",
"dependencies": {
"@evan.network/dbcp": "^1.8.2",
"@evan.network/smart-contracts-core": "^2.6.1",
"@evan.network/dbcp": "^1.8.3",
"@evan.network/smart-contracts-core": "^2.6.2",
"@types/node": "^12.6.8",
"ajv": "^6.10.2",
"async-mutex": "^0.1.3",
Expand Down Expand Up @@ -87,5 +87,5 @@
"testunitcoverage": "env-cmd --fallback -f ./.env.local npm run build && nyc -r lcov -e .ts -x \"$TESTSPECS\" mocha --exit -r ts-node/register $TESTSPECS && nyc report --reporter=text-lcov | coveralls"
},
"types": "./dist/index.d.ts",
"version": "2.12.0"
"version": "2.13.0"
}
37 changes: 14 additions & 23 deletions scripts/buildContracts.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
/*
Copyright (C) 2018-present evan GmbH.
Copyright (C) 2018-present evan GmbH.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License, version 3,
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
under the terms of the GNU Affero General Public License, version 3,
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program.
If not, see http://www.gnu.org/licenses/ or write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA,
or download the license from the following URL: https://evan.network/license/
You can be released from the requirements of the GNU Affero General Public License
by purchasing a commercial license.
Buying such a license is mandatory as soon as you use this software or parts of it
on other blockchains than evan.network.
For more information, please contact evan GmbH at this address: https://evan.network/license/
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see http://www.gnu.org/licenses/ or
write to the Free Software Foundation, Inc., 51 Franklin Street,
Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from
the following URL: https://evan.network/license/
*/

const smartContractsCore = require('@evan.network/smart-contracts-core');
Expand Down
19 changes: 19 additions & 0 deletions scripts/commit-msg.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
Copyright (C) 2018-present evan GmbH.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License, version 3,
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see http://www.gnu.org/licenses/ or
write to the Free Software Foundation, Inc., 51 Franklin Street,
Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from
the following URL: https://evan.network/license/
*/

var fs = require('fs');
var path = require('path');

Expand Down
17 changes: 17 additions & 0 deletions scripts/link.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
#!/bin/sh

# Copyright (C) 2018-present evan GmbH.
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License, version 3,
# as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see http://www.gnu.org/licenses/ or
# write to the Free Software Foundation, Inc., 51 Franklin Street,
# Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from
# the following URL: https://evan.network/license/

root="$(pwd)/../"

# $1 is parent module
Expand Down
8 changes: 0 additions & 8 deletions src/common/utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@
write to the Free Software Foundation, Inc., 51 Franklin Street,
Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from
the following URL: https://evan.network/license/
You can be released from the requirements of the GNU Affero General Public
License by purchasing a commercial license.
Buying such a license is mandatory as soon as you use this software or parts
of it on other blockchains than evan.network.
For more information, please contact evan GmbH at this address:
https://evan.network/license/
*/

import 'mocha';
Expand Down
8 changes: 0 additions & 8 deletions src/common/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@
write to the Free Software Foundation, Inc., 51 Franklin Street,
Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from
the following URL: https://evan.network/license/
You can be released from the requirements of the GNU Affero General Public
License by purchasing a commercial license.
Buying such a license is mandatory as soon as you use this software or parts
of it on other blockchains than evan.network.
For more information, please contact evan GmbH at this address:
https://evan.network/license/
*/

import { Runtime } from '../index'
Expand Down
8 changes: 0 additions & 8 deletions src/config-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@
write to the Free Software Foundation, Inc., 51 Franklin Street,
Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from
the following URL: https://evan.network/license/
You can be released from the requirements of the GNU Affero General Public
License by purchasing a commercial license.
Buying such a license is mandatory as soon as you use this software or parts
of it on other blockchains than evan.network.
For more information, please contact evan GmbH at this address:
https://evan.network/license/
*/

const configCore = {
Expand Down
8 changes: 0 additions & 8 deletions src/config-testcore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@
write to the Free Software Foundation, Inc., 51 Franklin Street,
Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from
the following URL: https://evan.network/license/
You can be released from the requirements of the GNU Affero General Public
License by purchasing a commercial license.
Buying such a license is mandatory as soon as you use this software or parts
of it on other blockchains than evan.network.
For more information, please contact evan GmbH at this address:
https://evan.network/license/
*/

const configTestcore = {
Expand Down
8 changes: 0 additions & 8 deletions src/contracts/base-contract/base-contract.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@
write to the Free Software Foundation, Inc., 51 Franklin Street,
Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from
the following URL: https://evan.network/license/
You can be released from the requirements of the GNU Affero General Public
License by purchasing a commercial license.
Buying such a license is mandatory as soon as you use this software or parts
of it on other blockchains than evan.network.
For more information, please contact evan GmbH at this address:
https://evan.network/license/
*/

import 'mocha';
Expand Down
8 changes: 0 additions & 8 deletions src/contracts/base-contract/base-contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@
write to the Free Software Foundation, Inc., 51 Franklin Street,
Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from
the following URL: https://evan.network/license/
You can be released from the requirements of the GNU Affero General Public
License by purchasing a commercial license.
Buying such a license is mandatory as soon as you use this software or parts
of it on other blockchains than evan.network.
For more information, please contact evan GmbH at this address:
https://evan.network/license/
*/

import {
Expand Down
8 changes: 0 additions & 8 deletions src/contracts/business-center/business-center.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@
write to the Free Software Foundation, Inc., 51 Franklin Street,
Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from
the following URL: https://evan.network/license/
You can be released from the requirements of the GNU Affero General Public
License by purchasing a commercial license.
Buying such a license is mandatory as soon as you use this software or parts
of it on other blockchains than evan.network.
For more information, please contact evan GmbH at this address:
https://evan.network/license/
*/

import 'mocha';
Expand Down
8 changes: 0 additions & 8 deletions src/contracts/data-contract/data-contract.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@
write to the Free Software Foundation, Inc., 51 Franklin Street,
Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from
the following URL: https://evan.network/license/
You can be released from the requirements of the GNU Affero General Public
License by purchasing a commercial license.
Buying such a license is mandatory as soon as you use this software or parts
of it on other blockchains than evan.network.
For more information, please contact evan GmbH at this address:
https://evan.network/license/
*/

import 'mocha';
Expand Down
Loading

0 comments on commit 7ac4263

Please sign in to comment.