This project aims to demonstrate how one could implement a CHAPI conformant
Wallet using DIDKit.
To 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 Node.js/NPM.
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:
$ make -C lib install-wasm-packThen, you have to build the WASM target of DIDKit:
$ make -C lib ../target/test/wasm.stampIf everything succeeds, you can proceed to the next step.
Install the npm dependencies of this example project using
Yarn with:
$ cd examples/svelte-chapi-wallet
$ yarn installThe run the app in development mode with:
$ yarn run devYou should now be able to see the app running on localhost:5000.
To create an optimised version of the app:
$ yarn run buildYou 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.