Awesome
didcomm-demo
Showcase DIDComm V2 implementation.
- It shows how peerdid and didcomm libraries can be used together on the application level.
- It shows interoperability between Python and Java/Kotlin libraries.
Content
didcomm-demo-jvm
- how peerdid JVM and didcomm JVM can be used together on the application level.didcomm-demo
module - peerdid+didcomm working together- Demo.kt - JVM demo script
didcomm-demo-cli
module - a simple CLI for demo purposes
didcomm-demo-python
- how peerdid Python and didcomm Python can be used together on the application level.- didcomm_demo.py - peerdid+didcomm working together
- demo.py - Python demo script
- didcomm-cli - a simple CLI for demo purposes
Installation
Prerequisites: Python 3.7+, Java 8+.
- Create virtual environment for Python. For example,
python3 -m venv ./venv source ./venv/bin/activate
- Install Python part
cd didcomm-demo-python && pip install -e.[tests] && cd ..
- Build and Install JVM part
cd didcomm-demo-jvm && ./gradlew installDist && cd ..
Steps 2 and 3 can be run via ./install.sh
on Linux.
Running The Demo
After installation is done, just run python3 demo.py
from the root repository folder.
The Demo uses Python and JVM Demo CLIs to pass commands and prove interoperability.
Demo CLI
Both Python and JVM Demo CLIs have the same interface.
They can work with peer DIDs only.
Secrets are stored in local files, so the Demo CLIs should be used for demo and test purposes only.
Commands:
create-peer-did
resolve-peer-did <peer-did>
pack <msg> --from <from-peer-did> --to <to-peer-did>
unpack <msg>
Conforming Interoperability with 3d Party
If there is another DIDComm library implementation, one can check interoperability with these libs (assuming the usage of peer DIDs only) by:
- passing a packed message from 3d party lib to the Demo CLI's
unpack
command - pack a message via Demo CLI's
pack
command and pass the resulted JSON to the 3d party lib's unpack method