Svelte CHAPI
#
IntroductionThis project demonstrates how to implement a CHAPI-conformant Wallet using
DIDKit
compiled to WASM and the Svelte
web development framework. It uses did:key as its only DID Method.
Features:
- Simple listing of credentials
- Responds to GET and STORE requests
- [STORE] Verifies credentials with DIDKit and stores them.
- [GET] Issues VPs generated and signed using DIDKit
#
InstallationTo be able to run this example, you will need to build DIDKit
for the WASM
target. More instructions about the process can be found
here. You will also
need the Yarn package manager.
DIDKit
#
In short, you need to install the wasm-unknown-unknown
Rust target and
wasm-pack
, which can be done with the following command on the root of
DIDKit
:
#
BuildingThen, you have to build the WASM target of DIDKit
:
If everything succeeds, you can proceed to the next step.
#
RunningInstall the npm
dependencies of this example project using the Yarn
package manager:
The run the app in development mode with:
You should now be able to see the app running on localhost:5000.
#
Building and running in production modeTo create an optimised version of the app:
You can run the newly built app with yarn run start
. This uses
sirv, which is included in your
package.json's dependencies
so the app will function when deployed to
platforms such as Heroku.