Skip to content

openwallet-foundation-labs/wallet-framework-dotnet

Repository files navigation

Wallet Framework for .NET

Wallet Framework for .NET is an open framework for building digital identity wallets. The framework was initiated as Aries Framework .NET in the Hyperledger Foundation and was forked to express the goal to broaden the supported identity protocols, especially with regard to OID4VC and SD-JWT.

Table of Contents

Roadmap

  • OpenID4VC Support
  • SD-JWT VC Support
  • Replacing the indy-sdk

Protocols

OpenID for Verifiable Credentials (OID4VC)

Protocol Link State
OpenID for Verifiable Credential Issuance OID4VCI 🚧
- Pre-Authorized Code Flow Pre-Auth-Flow βœ…
- Authorization Code Flow Auth-Flow 🚧
- Holder Binding / Key Binding KB-JWT βœ…
- Wallet Attestation Wallet Attestation 🚧
- Issuer Authentication Issuer Authentication 🚧
- Demonstrating Proof of Possession DPoP 🚧
OpenID for Verifiable Presentations OID4VP 🚧
- Same-Device Flow Same-Device βœ…
- Cross-Device Flow Cross-Device βœ…
- Verifier Authentication Verifier Authentication 🚧
Self-Issued OpenID Provider v2 SIOPv2 🚧

Hyperledger Aries

AIP 1.0

Protocol State
0019-encryption-envelope βœ…
0160-connection-protocol βœ…
0036-issue-credential βœ…
0037-present-proof βœ…
0056-service-decorator βœ…
0025-didcomm-transports Http supported
0015-acks Partially supported
0035-report-problem Partially supported

AIP 2.0

Protocol State
0023-did-exchange βœ…
0048-trust-ping βœ…
0095-basic-message βœ…

Credential Formats

Credential Format Link State
AnonCreds 1.0 Anonymous Credential Protocol βœ…
SD-JWT-based Verifiable Credentials SD-JWT VC 🚧

Quickstart Guide

The framework fully leverages the .NET Core hosting model with full integration of dependency injection, configuration and hosting services.

Prerequisites

Create new web application

Using your favorite editor, create new web project. You can also create a project from the console.

dotnet new web -o AriesAgent

To setup your agent use the Startup.cs file to configure the framework.

Add the framework dependencies

Use the IServiceCollection extensions to add the dependent services to your application in the ConfigureServices(IServiceCollection services) method. Upon startup, the framework will create and configure your agent.

services.AddAriesFramework(builder =>
{
    builder.RegisterAgent(options =>
    {
        options.EndpointUri = "http://localhost:5000/";
    });
});

Note: If you'd like your agent to be accessible publically, use Ngrok to setup a public host and use that as the EndpointUri. When changing the endpoints, make sure you clear any previous wallets with the old configuration. Wallet data files are located in ~/.indy_client/wallet

For a list of all configuration options, check the AgentOptions.cs file.

Register the agent middleware

When running web applications, register the agent middleware in the Configure(IApplicationBuilder app, IWebHostEnvironment env) method. This will setup a middleware in the AspNetCore pipeline that will respond to incoming agent messages.

app.UseAriesFramework();

That's it. Run your project.

Demo

With Docker installed, run

docker-compose up

This will create an agent network with a pool of 4 indy nodes and 2 agents able to communicate with each other in the network. Navigate to http://localhost:7000 and http://localhost:8000 to create and accept connection invitations between the different agents.

Testing

To run the unit tests, the following dependencies also must be installed:

  • Docker

Install libindy library

Follow the build instructions for your OS on the Hyperledger Indy SDK Readme.

For macOS, if you get a 'indy' DLL not found exception, move the built libindy.dylib file to the test/Hyperledger.Aries.Tests/bin/Debug/netcoreapp3.1/ directory to explicitly add it to the path.

Run an indy node pool on localhost

docker build --build-arg pool_ip=127.0.0.1 -f docker/indy-pool.dockerfile -t indy_pool docker/
docker run -itd -p 9701-9709:9701-9709 indy_pool

Run an indy node pool on server

# replace <ip_address> with server IP address
docker build --build-arg pool_ip=<ip_address> -f docker/indy-pool.dockerfile -t indy_pool docker/
docker run -itd -p <ip_address>:9701-9709:9701-9709 indy_pool

Run the tests

First, edit the keyword in the scripts/tester.sh file to select the tests you want to run. Then, run the script

scripts/tester.sh 

Releases / Versioning

This Repository includes a github actions pipeline which builds and releases the wallet framework whenever a Pull Request is submitted or a merge to the main branch happens. When the build and release process is triggered by a pull request the build version has a "pr" suffix. If it is triggered by a merge towards the main branch the build version has a "rc" suffix. (e.g. 2.0.0-pr.x.x or 2.0.0-rc.x)

The build is accessible through the Open Wallet Foundation nuget feed.

License

Apache License Version 2.0

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages