Todays releases mainly focused on bugfixes, feedback from the community and more additional features for the DID and VC Support!

⭐️ Highlights in the API

📑 Precompiled smart-contracts

We removed the precompiled smart contracts in the smart-contracts-core package to ensure that the correct libraries for the different evan.network blockchains (testcore & core) are included in the compiled files. This operation took some time during first start of the api-blockchain-core runtime. When the device was on low power the compilation may have failed because this step could be terminated after 30 seconds.

With the release of version 2.10.0 we now reintroduced precompiled contracts and are now replacing the library addresses for the different networks on the fly. You do not need to update your existing code, it works out of the box. The only thing to consider is, that you now have to define which network you’re using with an environment variable called EVAN_CHAIN. You can set it to testcore and core to use these networks. If you not set the environment variable, it fallbacks to the testcore network.

This also applies for the browser included smart-contracts. You have to set the variable window.process.env.EVAN_CHAIN to the respective network. When this object not exist, create it before you require the api-blockchain-core or the smart-contracts-core package.

🎉 No more smart-contracts-core-browserified

When you are building a web project based on the evan apis, you had to include the *-browserified versions of the smart-contracts package and provide the contracts to the runtime. The field browser has been added to the package.json of the smart-contracts-core module. This points to the browser compatible version of the smart contracts. Bundlers like Webpack automatically detect this field and include this in the bundled version of the webapp. With this feature you don’t have to include the custom browserified version of the smart contracts and you also can remove the import of the smart-contracts-core package, because the api-blockchain-core automatically does this for you.

Before:

import * as bcc from '@evan.network/api-blockchain-core-browserified';
import * as smartcontracts from '@evan.network/smart-contracts-core-browserified';

// ... skipped the initialization of the web3

const formattedContracts = {};
Object.keys(smartcontracts).forEach((key) => {
    const contractKey = (key.indexOf(':') !== -1) ? key.split(':')[1] : key;
    formattedContracts[contractKey] = smartcontracts[key];
});

// create runtime
const runtime = await bcc.createDefaultRuntime(web3, dfs, {
  mnemonic: 'aaa bbb ccc',
  password: 'password',
}, {
  contracts: formattedContracts,
});

After:

import * as bcc from '@evan.network/api-blockchain-core-browserified';

// ... skipped the initialization of the web3

// create runtime
const runtime = await bcc.createDefaultRuntime(web3, dfs, {
  mnemonic: 'aaa bbb ccc',
  password: 'password',
});

👍 More features for DIDs and VCs

To enable more standard W3C properties in the evan DID documents we’ve added the following properties to DID Documents on evan:

  • updated
  • created
  • proof

example shown in here:

https://testcore.evan.network/did/did:evan:testcore:0x96dA854df34f5dcD25793B75e170B3d8c63A95Ad

{
  "@context": "https://w3id.org/did/v1",
  "id": "did:evan:testcore:0x96da854df34f5dcd25793b75e170b3d8c63a95ad",
  // ... snip
  "created": "2020-02-17T09:14:25.915Z",
  "updated": "2020-02-17T09:14:25.915Z",
  "proof": {
    "type": "EcdsaPublicKeySecp256k1",
    "created": "2020-02-17T09:14:25.933Z",
    "proofPurpose": "assertionMethod",
    "verificationMethod": "did:evan:testcore:0x96da854df34f5dcd25793b75e170b3d8c63a95ad#key-1",
    "jws": "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NkstUiJ9.eyJpYXQiOjE1ODE5MzA4NjUsImRpZERvY3VtZW50Ijp7IkBjb250ZXh0IjoiaHR0cHM6Ly93M2lkLm9yZy9kaWQvdjEiLCJpZCI6ImRpZDpldmFuOnRlc3Rjb3JlOjB4OTZkYTg1NGRmMzRmNWRjZDI1NzkzYjc1ZTE3MGIzZDhjNjNhOTVhZCIsInB1YmxpY0tleSI6W3siaWQiOiJkaWQ6ZXZhbjp0ZXN0Y29yZToweDk2ZGE4NTRkZjM0ZjVkY2QyNTc5M2I3NWUxNzBiM2Q4YzYzYTk1YWQja2V5LTEiLCJ0eXBlIjoiU2VjcDI1NmsxVmVyaWZpY2F0aW9uS2V5MjAxOCIsIm93bmVyIjoiZGlkOmV2YW46dGVzdGNvcmU6MHg5NmRhODU0ZGYzNGY1ZGNkMjU3OTNiNzVlMTcwYjNkOGM2M2E5NWFkIiwiZXRoZXJldW1BZGRyZXNzIjoiMHgwMDFkZTgyODkzNWU4YzdlNGNiNTZmZTYxMDQ5NWNhZTYzZmIyNjEyIn1dLCJhdXRoZW50aWNhdGlvbiI6WyJkaWQ6ZXZhbjp0ZXN0Y29yZToweDk2ZGE4NTRkZjM0ZjVkY2QyNTc5M2I3NWUxNzBiM2Q4YzYzYTk1YWQja2V5LTEiXSwiY3JlYXRlZCI6IjIwMjAtMDItMTdUMDk6MTQ6MjUuOTE1WiIsInVwZGF0ZWQiOiIyMDIwLTAyLTE3VDA5OjE0OjI1LjkxNVoifSwiaXNzIjoiZGlkOmV2YW46dGVzdGNvcmU6MHg5NmRhODU0ZGYzNGY1ZGNkMjU3OTNiNzVlMTcwYjNkOGM2M2E5NWFkIn0.yBMpk9cQikhHv3MEEXr4w3po9AZWLRtqhbW7iQ0L0e0Ylxkg5R4z9niOXuVpwueVjNP-tCNOa5HBCIJqnDts6wA"
  }
}

These properties are automatically added when you update your existing DID Document. All DID Documents are then also having a proof in it, which will be implicitly checked when you retrieve a DID Document from another account on evan. The created and updated fields will be initially filled with the current timestamp when you update a DID Document and they’re not previously set.

With the new api-blockchain-coreversion 2.18.0 you now have also the possibility to deactivate your DID Document. This functionality is nearly the same as the revoke for VCs… only for DIDs. You can use this function on the did module on the runtime described in the docu

const twinIdentity = '0x1234512345123451234512345123451234512345';
const twinDid = await runtime.did.convertIdentityToDid(twinIdentity);
await runtime.did.deactivateDidDocument(twinDid);

There is also a corresponding function didIsDeactivated which checks if the given DID is already deactivated. Function described in the docu

const twinIdentity = '0x1234512345123451234512345123451234512345';
const twinDid = await runtime.did.convertIdentityToDid(twinIdentity);
await runtime.did.deactivateDidDocument(twinDid);
console.log(await runtime.did.didIsDeactivated(twinDid));
// Output: true

🏎 Improved performance for digital twin sharing

We received a feedback, that when sharing data from digital twin containers it takes a very long time if you want to share more than 1 or 5 fields. We had a look into this and are now executing the transactions for the sharing in parallel and the sharing should now be done (up to 50%) faster.

🖥 New DApp Browser

The ui-dapp-browser is the general entrypoint for loading dezentraliced applications for the evan.network. Caused by many evolution steps, the dapp-browser was bloatet and used the latest versions of the api-blockchain-core and smart-contracts-core. As a result of this, DApps that are using old versions of the api-blockchain-core would load them twice. To fix this problem, the ui-dapp-browser is fully refactored and to reduce the overhead of dependency loading, it implements a direct connection to the blockchain to resolve ENS addresses without libraries. The desired api-blockchain-core version will be then defined by the DApps DBCP definition and only loaded, when needed. The new ENS loader has an integrated caching system, so the UI can, in combination with IPFS caching, reach a DApp load in under 1 second. 🎉

If your application uses old functionalities, you can just add the "olddappbrowser": "^2.8.0", to it’s dbcp definition and can require all old definitions via import { ... } from 'dapp-browser';. The old sources are now placed here.

The following features are now included:

  • connected blockchain configuration (config for testcore / core)
  • DApp loader for starting / loading DApps and there dependencies
  • ENS address resolver and caching
  • IPFS cache for storing IPFS files in the browser indexeddb
  • IPFS loading via rest calls
  • basic routing for starting ENS addresses from the location hash
  • util functions
    • dev mode for local development
    • log
    • event handling
    • browser name resolve
    • private mode detection

The complete release notes for all affected packages are as following:

Release Notes 05.03.2020

smart-contracts-core - Version 2.10.0

Features

  • Added deactivation feature for DidRegistry
  • Added precompiled contracts
    • setting now NODE_ENV or EVAN_CHAIN to testcoreor core the getContracts() will return the respective bytecode
    • in the browser you have to set window.process.env.EVAN_CHAIN to core or testcore then
    • when nothing set, testcore is the default

Fixes

  • add missing return to compiled.js and solc.js compiled.js building

dbcp - Version 1.11.1

Fixes

  • add check for passing undefined to getAddress, getContents, getAddressOrContents
  • fix buffer-to-string conversion, try to decode to utf8, if this fails, decode it to binary
  • add member-ordering rule to eslint config
  • updated dfs-interface.get return value to be more precise (Promise<string | Buffer>)
  • fix missing resolve on event-hub when event already removed
  • Omitting mandatory parameters when using executor methods now results in meaningful error messages
  • The EventHub now allows to subscribe to the same event multiple times using different listeners

api-blockchain-core - Version 2.18.0

Features

  • add methods deactivateDidDocument and didIsDeactivated to check and handle DID deactivation status
  • improve performance of shareProperties, unshareProperties, setContainerShareConfigs and related operations in Container
  • add methods deactivateDidDocument and didIsDeactivated to check and handle DID deactivation status
  • added additional properties updated, created, and proof to DID documents
  • added proof validation to getDidDocument (only for documents that actually contain a proof)
  • export config and runtimeConfig by createDefaultRuntime
  • introduced interfaces for did documents getDidDocument, setDidDocument, and setDidDocumentOffline

Fixes

  • fix credentialStatus.id uses short hand path for resolver links
  • add check for getRevokeVcStatus to throw error when non existing VC is passed
  • fix ipfsLib now uses the configured port
  • fix getListEntries in the api docs
  • fix buffer-to-string conversion, try to decode to utf8, if this fails, decode it to binary
  • add member-ordering rule to eslint config
  • fix container.getListEntry to not throw an exception on call anymore
  • replaced deprecated property owner in DID publicKey fields with controller
  • fix pending contract members after unshare
  • update verification keys for onboarding, when useIdentity is enabled
  • reset activeIdentity within createOfflineProfile when useIdentity is enabled

ui-dapp-browser - Version 3.0.1

Features

  • full refactoring
  • full typescript usage
  • load local deps also from index.html (dev.html is obsolete)
  • use better ipfs / ens resolving / caching

Deprecations

  • remove ionic and cordova
  • move dapps-watching to dist/dapps.js
  • main entrypoint changed dist location to dist/dapp-browser.js
  • no js client shim included
  • remove old functions and move them to https://github.com/evannetwork/ui-dapps/tree/develop/evan-libs/old-dapp-browser/src
    • all blockchain-core ui dependencies (bccHelper, AccountStore, KeyProvider)
    • lightwallet
    • notifications

ui-dapps - Version 4.0.1

  • general bug fixes and small improvements

Features

  • dapps
    • digital-twin-detail
      • add UI for twins where current user has no or only partial permissions

Fixes

  • dapps
    • onboarding.vue
      • allow contact accept after sign-up / sign-in / already logged in account
      • fix sign-up password repeat checks

Deprecations

  • core
    • ui.libs, evancore.vue.libs
      • remove .evan-nav-list css class in favor of <evan-nav-list> component
    • web3
    • queue