agent-framework - AgentFramework.Core 4.0.2
.NET Core tools for building agent services
PM> Install-Package AgentFramework.Core -Version 4.0.2 -Source https://www.myget.org/F/agent-framework/api/v3/index.json
> nuget.exe install AgentFramework.Core -Version 4.0.2 -Source https://www.myget.org/F/agent-framework/api/v3/index.json
> dotnet add package AgentFramework.Core --version 4.0.2 --source https://www.myget.org/F/agent-framework/api/v3/index.json
source https://www.myget.org/F/agent-framework/api/v3/index.json
nuget AgentFramework.Core ~> 4.0.2
Copy to clipboard
> choco install AgentFramework.Core --version 4.0.2 --source https://www.myget.org/F/agent-framework/api/v2
Import-Module PowerShellGet
Register-PSRepository -Name "agent-framework" -SourceLocation "https://www.myget.org/F/agent-framework/api/v2"
Install-Module -Name "AgentFramework.Core" -RequiredVersion "4.0.2" -Repository "agent-framework"
Copy to clipboard
Aries Framework for .NET [ARCHIVED]
:warning: This project is archived and no longer maintained. The repository is kept for historical purposes and is read-only.
The work is continued at Open Wallet Foundation (OWF): https://github.com/openwallet-foundation-labs/wallet-framework-dotnet
Aries Framework for .NET is a comprehensive implementation of the Aries protocols. It's purpose is to provide a universal library for building SSI application for the cloud, mobile and IoT stack.
Table of Contents
Environment Setup
Prerequisites
- Install .NET Core
- Install libindy for your platform
Installation
Aries Framework for .NET comes as a Nuget package available at nuget.org
PM> Install-Package Hyperledger.Aries
If you are developing a web application, also install Hyperledger.Aries.AspNetCore package.
Quickstart Guide
The framework fully leverages the .NET Core hosting model with full integration of dependency injection, configuration and hosting services.
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
License
-
.NETStandard 2.0
- Hyperledger.Indy.Sdk (>= 1.9.0)
- Microsoft.Extensions.Http (>= 2.1.1)
- Microsoft.Extensions.Logging (>= 2.1.1)
- Newtonsoft.Json (>= 11.0.2)
- Stateless (>= 4.2.1)
- System.Reactive.Linq (>= 4.1.2)
- .NETStandard 2.0: 2.0.0.0
Ownerstmarkovski |
AuthorsTomislav Markovski, Tobias Looker |
Project URLhttps://github.com/hyperledger/aries-framework-dotnet |
LicenseApache-2.0 |
Info154 total downloads |
3 downloads for version 4.0.2 |
Download (157.85 KB) |
Found on the current feed only |
Package history
Version | Size | Last updated | Downloads | Mirrored? | |||
---|---|---|---|---|---|---|---|
4.3.0 | 169.66 KB | Tue, 19 Nov 2019 16:23:47 GMT | 3 | ||||
4.3.0-preview.1558 | 169.7 KB | Mon, 18 Nov 2019 17:57:53 GMT | 2 | ||||
4.3.0-preview.1523 | 175.82 KB | Wed, 13 Nov 2019 14:11:28 GMT | 2 | ||||
4.3.0-preview.1411 | 172.7 KB | Thu, 31 Oct 2019 16:06:48 GMT | 3 | ||||
4.3.0-preview.1293 | 169.19 KB | Wed, 23 Oct 2019 21:50:41 GMT | 3 | ||||
4.3.0-preview.1287 | 167.88 KB | Mon, 21 Oct 2019 17:35:39 GMT | 3 | ||||
4.3.0-preview.1281 | 167.88 KB | Sun, 20 Oct 2019 23:47:54 GMT | 3 | ||||
4.2.1 | 166.7 KB | Sat, 19 Oct 2019 20:41:47 GMT | 4 | ||||
4.2.1-preview.1277 | 166.75 KB | Sat, 19 Oct 2019 15:11:46 GMT | 3 | ||||
4.2.0 | 165.79 KB | Thu, 17 Oct 2019 20:00:09 GMT | 3 | ||||
4.2.0-preview.1266 | 165.83 KB | Thu, 17 Oct 2019 13:35:32 GMT | 2 | ||||
4.1.0 | 164.83 KB | Mon, 07 Oct 2019 18:06:27 GMT | 3 | ||||
4.1.0-preview.1215 | 164.87 KB | Mon, 07 Oct 2019 17:57:35 GMT | 5 | ||||
4.0.2 | 157.85 KB | Fri, 27 Sep 2019 00:48:42 GMT | 3 | ||||
4.0.2-preview.1171 | 157.88 KB | Tue, 01 Oct 2019 19:25:19 GMT | 2 | ||||
4.0.2-preview.1128 | 157.88 KB | Fri, 27 Sep 2019 00:40:08 GMT | 3 | ||||
4.0.2-preview.1126 | 157.88 KB | Fri, 27 Sep 2019 00:11:42 GMT | 2 | ||||
4.0.1 | 157.85 KB | Fri, 27 Sep 2019 00:04:15 GMT | 3 | ||||
4.0.1-preview.1127 | 157.88 KB | Fri, 27 Sep 2019 00:39:26 GMT | 2 | ||||
4.0.1-preview.1125 | 157.88 KB | Thu, 26 Sep 2019 23:57:58 GMT | 3 | ||||
4.0.1-preview.1069 | 157.89 KB | Wed, 18 Sep 2019 12:18:29 GMT | 2 | ||||
4.0.0 | 155.79 KB | Wed, 07 Aug 2019 12:25:55 GMT | 2 | ||||
4.0.0-preview.705 | 155.82 KB | Tue, 16 Jul 2019 02:19:15 GMT | 2 | ||||
4.0.0-preview.704 | 150.15 KB | Mon, 15 Jul 2019 22:07:08 GMT | 3 | ||||
4.0.0-preview.701 | 150.15 KB | Wed, 10 Jul 2019 12:31:18 GMT | 4 | ||||
4.0.0-preview.666 | 136.36 KB | Fri, 28 Jun 2019 15:34:45 GMT | 3 | ||||
4.0.0-preview.665 | 136.36 KB | Wed, 26 Jun 2019 18:26:34 GMT | 2 | ||||
4.0.0-preview.664 | 136.36 KB | Wed, 26 Jun 2019 15:26:19 GMT | 3 | ||||
4.0.0-preview.662 | 136.36 KB | Mon, 17 Jun 2019 04:04:52 GMT | 3 | ||||
4.0.0-preview.660 | 136.37 KB | Fri, 14 Jun 2019 01:56:16 GMT | 2 | ||||
4.0.0-preview.650 | 136.61 KB | Thu, 13 Jun 2019 12:23:39 GMT | 2 | ||||
4.0.0-preview.648 | 136.58 KB | Mon, 03 Jun 2019 20:43:35 GMT | 3 | ||||
4.0.0-preview.647 | 136.51 KB | Thu, 23 May 2019 22:03:05 GMT | 3 | ||||
4.0.0-preview.637 | 135.85 KB | Wed, 15 May 2019 18:57:50 GMT | 2 | ||||
4.0.0-preview.636 | 134.8 KB | Sun, 12 May 2019 03:02:42 GMT | 3 | ||||
4.0.0-preview.635 | 134.74 KB | Tue, 07 May 2019 20:47:25 GMT | 3 | ||||
4.0.0-preview.634 | 134.53 KB | Sat, 04 May 2019 23:21:19 GMT | 3 | ||||
4.0.0-preview.633 | 134.47 KB | Thu, 02 May 2019 18:32:50 GMT | 4 | ||||
4.0.0-preview.632 | 134.47 KB | Thu, 25 Apr 2019 19:31:09 GMT | 2 | ||||
4.0.0-preview.631 | 130.72 KB | Mon, 22 Apr 2019 22:42:08 GMT | 1 | ||||
4.0.0-preview.630 | 130.6 KB | Mon, 22 Apr 2019 00:50:20 GMT | 0 | ||||
4.0.0-preview.629 | 128.73 KB | Thu, 18 Apr 2019 22:28:17 GMT | 1 | ||||
4.0.0-preview.628 | 128.64 KB | Thu, 18 Apr 2019 21:12:06 GMT | 0 | ||||
4.0.0-preview.622 | 255.6 KB | Tue, 16 Apr 2019 11:25:41 GMT | 2 | ||||
4.0.0-preview.616 | 250.54 KB | Tue, 09 Apr 2019 20:17:06 GMT | 0 | ||||
4.0.0-preview.615 | 250.43 KB | Tue, 09 Apr 2019 02:24:38 GMT | 1 | ||||
3.1.0-preview.610 | 247.14 KB | Sat, 06 Apr 2019 12:26:46 GMT | 1 | ||||
3.1.0-preview.605 | 246.78 KB | Fri, 05 Apr 2019 09:03:17 GMT | 0 | ||||
3.0.3-preview.604 | 245.39 KB | Fri, 05 Apr 2019 03:15:43 GMT | 1 | ||||
3.0.2 | 245.36 KB | Thu, 04 Apr 2019 02:08:15 GMT | 1 | ||||
3.0.2-preview.603 | 245.37 KB | Wed, 03 Apr 2019 20:31:55 GMT | 0 | ||||
3.0.1 | 245.4 KB | Wed, 03 Apr 2019 00:25:03 GMT | 0 | ||||
3.0.1-preview.602 | 245.42 KB | Tue, 02 Apr 2019 23:09:57 GMT | 1 | ||||
3.0.0 | 245.36 KB | Mon, 01 Apr 2019 15:21:22 GMT | 1 | ||||
3.0.0-preview.601 | 245.38 KB | Mon, 01 Apr 2019 15:11:11 GMT | 1 | ||||
3.0.0-preview.600 | 245.38 KB | Sat, 30 Mar 2019 00:19:35 GMT | 1 | ||||
3.0.0-preview.599 | 244.92 KB | Sun, 24 Mar 2019 13:16:12 GMT | 0 | ||||
3.0.0-preview.598 | 244.92 KB | Sun, 24 Mar 2019 08:22:44 GMT | 1 | ||||
3.0.0-preview.597 | 244.92 KB | Sun, 24 Mar 2019 08:15:20 GMT | 0 | ||||
3.0.0-preview.588 | 244.92 KB | Fri, 22 Mar 2019 23:06:45 GMT | 0 | ||||
3.0.0-preview.586 | 245.01 KB | Thu, 21 Mar 2019 22:41:30 GMT | 0 | ||||
3.0.0-preview.585 | 199.68 KB | Thu, 21 Mar 2019 18:25:21 GMT | 2 | ||||
3.0.0-preview.584 | 199.68 KB | Thu, 21 Mar 2019 18:10:52 GMT | 1 | ||||
3.0.0-preview.583 | 199.62 KB | Thu, 21 Mar 2019 03:33:35 GMT | 0 | ||||
3.0.0-preview.581 | 199.62 KB | Tue, 19 Mar 2019 05:56:31 GMT | 0 | ||||
3.0.0-preview.580 | 198.09 KB | Mon, 18 Mar 2019 13:32:41 GMT | 0 | ||||
3.0.0-preview.579 | 199.99 KB | Sun, 17 Mar 2019 21:30:05 GMT | 1 | ||||
3.0.0-preview.578 | 199.91 KB | Sat, 16 Mar 2019 20:41:50 GMT | 1 | ||||
3.0.0-preview.577 | 197.94 KB | Sat, 16 Mar 2019 02:23:55 GMT | 1 | ||||
3.0.0-preview.574 | 197.67 KB | Fri, 15 Mar 2019 17:16:29 GMT | 2 | ||||
2.1.0-preview.573 | 196.75 KB | Fri, 15 Mar 2019 00:47:11 GMT | 1 | ||||
2.1.0-preview.572 | 193.34 KB | Fri, 15 Mar 2019 00:17:00 GMT | 1 | ||||
2.1.0-preview.559 | 192.22 KB | Fri, 08 Mar 2019 04:52:56 GMT | 0 | ||||
2.1.0-preview.558 | 177.09 KB | Thu, 07 Mar 2019 02:54:28 GMT | 0 | ||||
2.1.0-preview.554 | 177.23 KB | Mon, 04 Mar 2019 21:29:13 GMT | 1 | ||||
2.1.0-preview.538 | 160.04 KB | Fri, 22 Feb 2019 16:51:04 GMT | 0 | ||||
2.1.0-preview.535 | 160.02 KB | Thu, 21 Feb 2019 23:37:53 GMT | 2 | ||||
2.1.0-preview.515 | 160.02 KB | Sat, 16 Feb 2019 23:29:36 GMT | 0 | ||||
2.1.0-preview.492 | 160.03 KB | Tue, 12 Feb 2019 18:31:30 GMT | 1 | ||||
2.1.0-preview.491 | 160.02 KB | Mon, 11 Feb 2019 18:14:05 GMT | 1 | ||||
2.1.0-preview.464 | 153.34 KB | Wed, 06 Feb 2019 01:15:06 GMT | 0 | ||||
2.1.0-preview.451 | 151.4 KB | Tue, 05 Feb 2019 04:14:03 GMT | 1 | ||||
2.1.0-preview.443 | 151.07 KB | Mon, 04 Feb 2019 01:58:41 GMT | 0 | ||||
2.1.0-preview.417 | 150.83 KB | Thu, 31 Jan 2019 21:11:46 GMT | 2 | ||||
2.0.0 | 145.13 KB | Tue, 15 Jan 2019 21:44:05 GMT | 1 | ||||
2.0.0-preview.410 | 151.55 KB | Tue, 29 Jan 2019 23:50:28 GMT | 1 | ||||
2.0.0-preview.405 | 148.93 KB | Mon, 28 Jan 2019 19:35:51 GMT | 1 | ||||
2.0.0-preview.398 | 147.77 KB | Mon, 28 Jan 2019 00:09:02 GMT | 1 | ||||
2.0.0-preview.397 | 146.19 KB | Sun, 27 Jan 2019 23:43:16 GMT | 0 | ||||
2.0.0-preview.396 | 145.25 KB | Sun, 27 Jan 2019 19:37:18 GMT | 1 | ||||
2.0.0-preview.366 | 145.25 KB | Tue, 22 Jan 2019 02:23:02 GMT | 1 | ||||
2.0.0-preview.337 | 145.19 KB | Sat, 19 Jan 2019 02:01:33 GMT | 0 | ||||
2.0.0-preview.332 | 145.19 KB | Thu, 17 Jan 2019 19:36:46 GMT | 0 | ||||
2.0.0-preview.331 | 145.15 KB | Tue, 15 Jan 2019 21:37:03 GMT | 1 | ||||
2.0.0-ci-330 | 142.23 KB | Tue, 15 Jan 2019 14:22:15 GMT | 0 | ||||
2.0.0-ci-329 | 140.85 KB | Mon, 14 Jan 2019 19:58:50 GMT | 1 | ||||
2.0.0-ci-328 | 143.16 KB | Sat, 12 Jan 2019 15:27:38 GMT | 0 | ||||
2.0.0-ci-327 | 144.96 KB | Fri, 11 Jan 2019 13:45:15 GMT | 0 | ||||
2.0.0-ci-326 | 144.96 KB | Thu, 10 Jan 2019 19:35:05 GMT | 0 | ||||
1.1.0 | 114.73 KB | Sat, 15 Dec 2018 00:17:23 GMT | 0 | ||||
1.1.0-ci-324 | 144.98 KB | Wed, 09 Jan 2019 20:40:25 GMT | 1 | ||||
1.1.0-ci-323 | 118.63 KB | Wed, 09 Jan 2019 20:08:50 GMT | 0 | ||||
1.1.0-ci-314 | 119.52 KB | Mon, 31 Dec 2018 21:00:56 GMT | 1 | ||||
1.1.0-ci-313 | 117.23 KB | Thu, 27 Dec 2018 21:20:43 GMT | 1 | ||||
1.1.0-ci-312 | 117.06 KB | Wed, 26 Dec 2018 02:39:40 GMT | 0 | ||||
1.1.0-ci-311 | 117.06 KB | Tue, 25 Dec 2018 02:57:28 GMT | 1 | ||||
1.1.0-ci-310 | 114.94 KB | Wed, 19 Dec 2018 04:28:32 GMT | 1 | ||||
1.1.0-ci-309 | 114.87 KB | Tue, 18 Dec 2018 03:18:17 GMT | 1 | ||||
1.1.0-ci-303 | 114.74 KB | Sat, 15 Dec 2018 00:09:17 GMT | 0 | ||||
1.1.0-ci-302 | 114.74 KB | Fri, 14 Dec 2018 23:56:40 GMT | 1 |