Ex07: Virtual adapter (interface)

Task: change the twitter adapter to an identity adapter and check it on Twitter and Instagram.

The initial code for this example is in master.

Change the twitter adapter to an identity adapter in /dapplet.json with a right version:

1{
2 ...
3 "contextIds": ["identity-adapter.dapplet-base.eth"],
4 ...
5 "dependencies": {
6 "identity-adapter.dapplet-base.eth": "0.3.0"
7 }
8}

In src/index.ts change the injected adapter:

@Inject('identity-adapter.dapplet-base.eth') public adapter: any;

Here is the result code of the example: ex07-virtual-adapter.

Run the dapplet:

npm i
npm start