Giter Site home page Giter Site logo

pinkdiamond1 / waltid-walletkit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from walt-id/waltid-walletkit

0.0 1.0 0.0 1.04 MB

Supercharge your app with SSI, NFTs or fungible tokens

Home Page: https://docs.walt.id

License: Apache License 2.0

Kotlin 99.38% Dockerfile 0.62%

waltid-walletkit's Introduction

Wallet Kit

by walt.id

Supercharge your app with SSI, NFTs or fungible tokens

CI/CD Workflow for Walt.ID Wallet Kit

Join community! Follow @walt_id

Getting Started

  • REST Api - Use the functionality of the Wallet Kit via an REST api.
  • Maven/Gradle Dependency - Use the functions of the Wallet Kit in a Kotlin/Java project.

The Wallet Kit on its own gives you, the backend infrastructure to build a custom wallet solution. However, in conjunction with our pre-build frontend components, you can even have a full solution. Get started with the full solution, using:

Checkout the Official Documentation, to find out more.

What is the Wallet Kit?

It is the API and backend business logic for the walt.id web wallet. Additionally, it includes a reference implementation of a Verifier and Issuer Portal backend.

Services

Web walletkit

  • User management
    • Authorization is currently mocked and not production ready
    • User-context switching and user-specific encapsulated data storage
  • Basic user data management
    • List dids
    • List credentials
  • Verifiable Credential and Presentation exchange
    • Support for credential presentation exchange based on OIDC-SIOPv2 spec

Verifier portal backend

  • Wallet configuration
    • Possibility to configure list of supported wallets (defaults to walt.id web wallet)
  • Presentation exchange
    • Support for presentation exchange based on OIDC-SIOPv2 spec

Issuer portal backend

  • Wallet configuration
    • Possibility to configure list of supported wallets (defaults to walt.id web wallet)
  • Verifiable credential issuance
    • Support for issuing verifiable credentials to the web wallet, based on OIDC-SIOPv2 spec

Join the community

Related components | Full Solution

Test deployment

The snap-shot version of this repository is automatically deployed for testing purpose. Feel free to access the test system at the following endpoints:

Usage

Configuration and data are kept in sub folders of the data root:

  • config/
  • data/

Data root is by default the current working directory.

It can be overridden by specifying the environment variable:

WALTID_DATA_ROOT

Verifier portal and wallet configuration:

config/verifier-config.json

{
  "verifierUiUrl": "http://localhost:4000",                 # URL of verifier portal UI
  "verifierApiUrl": "http://localhost:8080/verifier-api",   # URL of verifier portal API
  "wallets": {                                              # wallet configuration
    "walt.id": {                                            # wallet configuration key
      "id": "walt.id",                                      # wallet ID
      "url": "http://localhost:3000",                       # URL of wallet UI
      "presentPath": "CredentialRequest",                   # URL subpath for a credential presentation request
      "receivePath" : "ReceiveCredential/",                 # URL subpath for a credential issuance request
      "description": "walt.id web wallet"                   # Wallet description
    }
  }
}

Issuer portal and wallet configuration:

config/issuer-config.json

{
  "issuerUiUrl": "http://localhost:5000",                   # URL of issuer portal UI
  "issuerApiUrl": "http://localhost:8080/issuer-api",       # URL of issuer portal API (needs to be accessible from the walletkit)
  "wallets": {                                              # wallet configuration
    "walt.id": {                                            # wallet configuration key
      "id": "walt.id",                                      # wallet ID
      "url": "http://localhost:3000",                       # URL of wallet UI
      "presentPath": "CredentialRequest",                   # URL subpath for a credential presentation request
      "receivePath" : "ReceiveCredential/",                 # URL subpath for a credential issuance request
      "description": "walt.id web wallet"                   # Wallet description
    }
  }
}

Wallet backend configuration

User data (dids, keys, credentials) are currently stored under

data/<[email protected]>

It is planned to allow users to define their own storage preferences, in the future.

APIs

The APIs are launched on port 8080.

A swagger documentation is available under

/api/swagger

Wallet API is available under the context path /api/

Verifier portal API is available under the context path /verifier-api/

Issuer portal API is available under the context path /issuer-api/

Build & run the Web Wallet Kit

Gradle or Docker can be used to build this project independently. Once running, one can access the Swagger API at http://localhost:8080/api/swagger

Gradle

gradle build

unzip package under build/distributions and switch into the new folder. Copy config-files service-matrix.properties and signatory.conf from the root folder and run the bash-script:

./bin/waltid-walletkit

To run the backend you will execute: waltid-walletkit run To have issuers, you will have to execute: waltid-walletkit --init-issuer

Docker

docker build -t waltid/walletkit .

docker run -it -p 8080:8080 waltid/walletkit

Running all components with Docker Compose

To spawn the backend together with the wallet frontend, the issuer- and the verifier-portal, one can make use of the docker-compose configuration located in folder:

./docker/

In order to simply run everything, enter:

docker-compose up

This configuration will publish the following endpoints by default:

  • web wallet on [HOSTNAME]:8080
    • wallet frontend: http://[HOSTNAME]:8080/
    • wallet API: http://[HOSTNAME]:8080/api/
  • verifier portal on [HOSTNAME]:8081
    • verifier frontend: http://[HOSTNAME]:8081/
    • verifier API: http://[HOSTNAME]:8081/verifier-api/
  • issuer portal on [HOSTNAME]:8082
    • issuer frontend: http://[HOSTNAME]:8082/
    • issuer API: http://[HOSTNAME]:8082/issuer-api/

Note

[HOSTNAME] is your local computer name. Using localhost, not all features will work correctly.

Visit the ./docker. folder for adjusting the system config in the following files

  • docker-compose.yaml - Docker config for launching containers, volumes & networking
  • ingress.conf - Routing config
  • config/verifier-config.json - verifier portal configuration
  • config/issuer-config.json - issuer portal configuration

Initializing Wallet Kit as EBSI/ESSIF Issuer

By specifying the optional startup parameter --init-issuer the walletkit can be initialized as issuer-backend in line with the EBSI/ESSIF ecosystem. Note that this is for demo-purpose only.

cd docker
docker pull waltid/walletkit
docker run -it -v $PWD:/waltid-walletkit/data-root -e WALTID_DATA_ROOT=./data-root waltid/walletkit --init-issuer

# For the DID-method enter: "ebsi"
# For the bearer token copy/paste the value from: https://app.preprod.ebsi.eu/users-onboarding

The initialization routine will output the DID, which it registered on the EBSI/ESSIF ecosystem.

Relevant Standards

License

Licensed under the Apache License, Version 2.0

waltid-walletkit's People

Contributors

ahmedsmiai avatar aminbenmansour avatar drandarov-io avatar kburgmann avatar khemiriwalid avatar mikeplotean avatar philpotisk avatar severinstampler avatar taminobaumann avatar waltkb avatar xxlestadxx avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.