├── .dockerignore ├── .editorconfig ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── PULL_REQUEST_TEMPLATE.md └── settings.yml ├── .gitignore ├── CodeMaid.config ├── Directory.Build.props ├── LICENSE ├── MAINTAINERS.md ├── README.md ├── SECURITY.md ├── azure-pipelines.yml ├── docker-compose.test.yaml ├── docker-compose.yaml ├── docker ├── commands.txt ├── docker_pool_genesis.txn ├── indy-pool.dockerfile ├── test-agent.dockerfile └── web-agent.dockerfile ├── docs ├── Makefile ├── _static │ ├── custom.css │ └── images │ │ ├── choose_template.png │ │ ├── configure_agent.png │ │ └── target_framework.png ├── _templates │ └── page.html ├── aspnetcore.rst ├── conf.py ├── docker.rst ├── errors.rst ├── gettingstarted.rst ├── index.rst ├── installation.rst ├── make.bat ├── payments.rst ├── quickstart.rst ├── samples.rst └── xamarin.rst ├── global.json ├── nuget.config ├── samples ├── aspnetcore │ ├── Controllers │ │ ├── ConnectionsController.cs │ │ ├── CredentialsController.cs │ │ └── HomeController.cs │ ├── Models │ │ ├── AcceptConnectionViewModel.cs │ │ ├── ConnectionsViewModel.cs │ │ ├── CredentialFormModel.cs │ │ ├── CredentialOfferModel.cs │ │ ├── CredentialViewModel.cs │ │ ├── CredentialsViewModel.cs │ │ ├── ErrorViewModel.cs │ │ └── LaunchAppViewModel.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── Protocols │ │ ├── BasicMessage │ │ │ ├── BasicMessage.cs │ │ │ ├── BasicMessageHandler.cs │ │ │ └── BasicMessageRecord.cs │ │ ├── CustomMessageTypes.cs │ │ └── TrustPing │ │ │ ├── TrustPingMessage.cs │ │ │ ├── TrustPingMessageHandler.cs │ │ │ └── TrustPingResponseMessage.cs │ ├── README.md │ ├── SimpleWebAgent.cs │ ├── Startup.cs │ ├── Utils │ │ ├── Extensions.cs │ │ └── NameGenerator.cs │ ├── Views │ │ ├── Connections │ │ │ ├── CreateInvitation.cshtml │ │ │ ├── Details.cshtml │ │ │ ├── Index.cshtml │ │ │ └── ViewInvitation.cshtml │ │ ├── Credentials │ │ │ ├── CredentialsForm.cshtml │ │ │ └── Index.cshtml │ │ ├── Home │ │ │ └── Index.cshtml │ │ ├── Shared │ │ │ ├── Error.cshtml │ │ │ ├── _LaunchApp.cshtml │ │ │ ├── _Layout.cshtml │ │ │ └── _ValidationScriptsPartial.cshtml │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ ├── WebAgent.csproj │ ├── WebAgent.sln │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── bundleconfig.json │ ├── pool_genesis.txn │ └── wwwroot │ │ ├── css │ │ ├── site.css │ │ └── site.min.css │ │ ├── favicon.ico │ │ ├── images │ │ ├── banner1.svg │ │ ├── banner2.svg │ │ ├── banner3.svg │ │ ├── banner4.svg │ │ └── profile.png │ │ ├── js │ │ ├── site.js │ │ └── site.min.js │ │ └── lib │ │ ├── bootstrap │ │ └── dist │ │ │ ├── css │ │ │ ├── bootstrap-grid.css │ │ │ ├── bootstrap-grid.css.map │ │ │ ├── bootstrap-grid.min.css │ │ │ ├── bootstrap-grid.min.css.map │ │ │ ├── bootstrap-reboot.css │ │ │ ├── bootstrap-reboot.css.map │ │ │ ├── bootstrap-reboot.min.css │ │ │ ├── bootstrap-reboot.min.css.map │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ ├── bootstrap.min.css │ │ │ └── bootstrap.min.css.map │ │ │ └── js │ │ │ ├── bootstrap.bundle.js │ │ │ ├── bootstrap.bundle.js.map │ │ │ ├── bootstrap.bundle.min.js │ │ │ ├── bootstrap.bundle.min.js.map │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.js.map │ │ │ ├── bootstrap.min.js │ │ │ └── bootstrap.min.js.map │ │ ├── jquery-validation │ │ ├── .bower.json │ │ ├── LICENSE.md │ │ └── dist │ │ │ ├── additional-methods.js │ │ │ ├── additional-methods.min.js │ │ │ ├── jquery.validate.js │ │ │ └── jquery.validate.min.js │ │ └── jquery │ │ └── dist │ │ ├── core.js │ │ ├── jquery.js │ │ ├── jquery.min.js │ │ ├── jquery.min.map │ │ ├── jquery.slim.js │ │ ├── jquery.slim.min.js │ │ └── jquery.slim.min.map ├── blazorHosted │ ├── .editorconfig │ ├── .gitignore │ ├── CodeMaid.config │ ├── Directory.Build.props │ ├── Documentation │ │ ├── Contribute.md │ │ ├── DirectoryStructure.md │ │ ├── Overview.md │ │ ├── ReleaseNotes.md │ │ └── TestStructure.md │ ├── Hyperledger.Aries.AspNetCore.sln │ ├── NuGet.config │ ├── README.md │ ├── Run.ps1 │ ├── RunAlice.ps1 │ ├── RunAliceAndFaber.ps1 │ ├── RunFaber.ps1 │ ├── Source │ │ ├── Client │ │ │ ├── AssemblyAnnotations.cs │ │ │ ├── Components │ │ │ │ ├── App.razor │ │ │ │ ├── App.razor.cs │ │ │ │ ├── BlazorLocation.razor │ │ │ │ ├── BlazorLocation.razor.cs │ │ │ │ ├── Forms │ │ │ │ │ └── InputSelectNumber.cs │ │ │ │ ├── Identicon.razor │ │ │ │ ├── Identicon.razor.cs │ │ │ │ ├── MainLayout.razor │ │ │ │ ├── MainLayout.razor.cs │ │ │ │ ├── ResetButton.razor │ │ │ │ ├── ResetButton.razor.cs │ │ │ │ ├── TransformProperty.razor │ │ │ │ └── TransformProperty.razor.cs │ │ │ ├── Extensions │ │ │ │ └── HttpClientNewtonsoftJsonExtensions.cs │ │ │ ├── Features │ │ │ │ ├── Application │ │ │ │ │ ├── Actions │ │ │ │ │ │ ├── ResetStore │ │ │ │ │ │ │ ├── ResetStoreAction.cs │ │ │ │ │ │ │ └── ResetStoreHandler.cs │ │ │ │ │ │ └── ToggleMenu │ │ │ │ │ │ │ ├── ToggleMenuAction.cs │ │ │ │ │ │ │ └── ToggleMenuHandler.cs │ │ │ │ │ ├── ApplicationState.Debug.cs │ │ │ │ │ ├── ApplicationState.cs │ │ │ │ │ └── Components │ │ │ │ │ │ ├── AccountMenu.razor │ │ │ │ │ │ ├── AccountMenu.razor.cs │ │ │ │ │ │ ├── Footer.razor │ │ │ │ │ │ ├── Footer.razor.cs │ │ │ │ │ │ ├── NavBar.razor │ │ │ │ │ │ ├── NavBar.razor.cs │ │ │ │ │ │ ├── NavLinks.razor │ │ │ │ │ │ ├── NavLinks.razor.cs │ │ │ │ │ │ ├── SideBar.razor │ │ │ │ │ │ └── SideBar.razor.cs │ │ │ │ ├── Base │ │ │ │ │ ├── BaseAction.cs │ │ │ │ │ ├── BaseHandler.cs │ │ │ │ │ └── Components │ │ │ │ │ │ └── BaseComponent.cs │ │ │ │ ├── ClientLoader │ │ │ │ │ ├── ClientLoader.cs │ │ │ │ │ ├── ClientLoaderConfiguration.cs │ │ │ │ │ └── IClientLoaderConfiguration.cs │ │ │ │ ├── Connection │ │ │ │ │ ├── Actions │ │ │ │ │ │ ├── AcceptInvitation │ │ │ │ │ │ │ ├── AcceptInvitationAction.cs │ │ │ │ │ │ │ └── AcceptInvitationHandler.cs │ │ │ │ │ │ ├── ChangePage │ │ │ │ │ │ │ ├── ChangePageAction.cs │ │ │ │ │ │ │ └── ChangePageHandler.cs │ │ │ │ │ │ ├── Create │ │ │ │ │ │ │ ├── CreateConnectionAction.cs │ │ │ │ │ │ │ └── CreateConnectionHandler.cs │ │ │ │ │ │ ├── Delete │ │ │ │ │ │ │ ├── DeleteConnectionAction.cs │ │ │ │ │ │ │ └── DeleteConnectionHandler.cs │ │ │ │ │ │ ├── Fetch │ │ │ │ │ │ │ ├── FetchConnectionsAction.cs │ │ │ │ │ │ │ └── FetchConnectionsHandler.cs │ │ │ │ │ │ ├── FetchConnection │ │ │ │ │ │ │ ├── FetchConnectionAction.cs │ │ │ │ │ │ │ └── FetchConnectionHandler.cs │ │ │ │ │ │ └── ViewInvitation │ │ │ │ │ │ │ ├── ViewInvitationAction.cs │ │ │ │ │ │ │ └── ViewInvitationHandler.cs │ │ │ │ │ ├── Components │ │ │ │ │ │ ├── Details.razor │ │ │ │ │ │ └── Details.razor.cs │ │ │ │ │ ├── ConnectionState.cs │ │ │ │ │ └── Pages │ │ │ │ │ │ ├── Create.razor │ │ │ │ │ │ ├── Create.razor.cs │ │ │ │ │ │ ├── Delete.razor │ │ │ │ │ │ ├── Delete.razor.cs │ │ │ │ │ │ ├── Details.razor │ │ │ │ │ │ ├── Details.razor.cs │ │ │ │ │ │ ├── Index.razor │ │ │ │ │ │ ├── Index.razor.cs │ │ │ │ │ │ ├── Invitation.razor │ │ │ │ │ │ └── Invitation.razor.cs │ │ │ │ ├── Counter │ │ │ │ │ ├── Actions │ │ │ │ │ │ ├── IncrementCount │ │ │ │ │ │ │ ├── IncrementCounterAction.cs │ │ │ │ │ │ │ └── IncrementCounterHandler.cs │ │ │ │ │ │ └── ThrowException │ │ │ │ │ │ │ ├── ThrowExceptionAction.cs │ │ │ │ │ │ │ └── ThrowExceptionHandler.cs │ │ │ │ │ ├── Components │ │ │ │ │ │ ├── Counter.razor │ │ │ │ │ │ └── Counter.razor.cs │ │ │ │ │ ├── CounterState.Debug.cs │ │ │ │ │ ├── CounterState.cs │ │ │ │ │ └── Pages │ │ │ │ │ │ ├── CounterPage.razor │ │ │ │ │ │ └── CounterPage.razor.cs │ │ │ │ ├── Credential │ │ │ │ │ ├── Actions │ │ │ │ │ │ ├── Fetch │ │ │ │ │ │ │ ├── FetchCredentialsAction.cs │ │ │ │ │ │ │ └── FetchCredentialsHandler.cs │ │ │ │ │ │ ├── OfferCredential │ │ │ │ │ │ │ ├── OfferCredentialAction.cs │ │ │ │ │ │ │ └── OfferCredentialHandler.cs │ │ │ │ │ │ └── Save │ │ │ │ │ │ │ ├── SaveCredentialAction.cs │ │ │ │ │ │ │ └── SaveCredentialHandler.cs │ │ │ │ │ ├── CredentialState.cs │ │ │ │ │ └── Pages │ │ │ │ │ │ ├── Edit.razor │ │ │ │ │ │ ├── Edit.razor.cs │ │ │ │ │ │ ├── Index.razor │ │ │ │ │ │ └── Index.razor.cs │ │ │ │ ├── CredentialDefinition │ │ │ │ │ ├── Actions │ │ │ │ │ │ ├── Create │ │ │ │ │ │ │ ├── CreateCredentialDefinitionAction.cs │ │ │ │ │ │ │ └── CreateCredentialDefinitionHandler.cs │ │ │ │ │ │ └── Fetch │ │ │ │ │ │ │ ├── FetchCredentialDefinitionsAction.cs │ │ │ │ │ │ │ └── FetchCredentialDefinitionsHandler.cs │ │ │ │ │ ├── CredentialDefinitionState.cs │ │ │ │ │ └── Pages │ │ │ │ │ │ ├── Create.razor │ │ │ │ │ │ ├── Create.razor.cs │ │ │ │ │ │ ├── Index.razor │ │ │ │ │ │ └── Index.razor.cs │ │ │ │ ├── PresentProof │ │ │ │ │ ├── Actions │ │ │ │ │ │ ├── AcceptProofRequest │ │ │ │ │ │ │ ├── AcceptProofRequestAction.cs │ │ │ │ │ │ │ └── AcceptProofRequestHandler.cs │ │ │ │ │ │ ├── Create │ │ │ │ │ │ │ ├── CreateProofRequestAction.cs │ │ │ │ │ │ │ └── CreateProofRequestHandler.cs │ │ │ │ │ │ ├── Fetch │ │ │ │ │ │ │ ├── FetchProofsAction.cs │ │ │ │ │ │ │ └── FetchProofsHandler.cs │ │ │ │ │ │ └── ViewProofRequest │ │ │ │ │ │ │ ├── ViewInvitationHandler.cs │ │ │ │ │ │ │ └── ViewProofRequestAction.cs │ │ │ │ │ ├── Pages │ │ │ │ │ │ ├── Create.razor │ │ │ │ │ │ ├── Create.razor.cs │ │ │ │ │ │ ├── Details.razor │ │ │ │ │ │ ├── Details.razor.cs │ │ │ │ │ │ ├── Index.razor │ │ │ │ │ │ ├── Index.razor.cs │ │ │ │ │ │ ├── View.razor │ │ │ │ │ │ └── View.razor.cs │ │ │ │ │ └── PresentProofState.cs │ │ │ │ ├── Schema │ │ │ │ │ ├── Actions │ │ │ │ │ │ ├── Create │ │ │ │ │ │ │ ├── CreateSchemaAction.cs │ │ │ │ │ │ │ └── CreateSchemaHandler.cs │ │ │ │ │ │ └── Fetch │ │ │ │ │ │ │ ├── FetchSchemasAction.cs │ │ │ │ │ │ │ └── FetchSchemasHandler.cs │ │ │ │ │ ├── Pages │ │ │ │ │ │ ├── Create.razor │ │ │ │ │ │ ├── Create.razor.cs │ │ │ │ │ │ ├── Index.razor │ │ │ │ │ │ └── Index.razor.cs │ │ │ │ │ └── SchemaState.cs │ │ │ │ └── Wallet │ │ │ │ │ ├── Actions │ │ │ │ │ ├── Fetch │ │ │ │ │ │ ├── FetchWalletAction.cs │ │ │ │ │ │ └── FetchWalletHandler.cs │ │ │ │ │ └── Reset │ │ │ │ │ │ ├── ResetWalletAction.cs │ │ │ │ │ │ └── ResetWalletHandler.cs │ │ │ │ │ ├── Pages │ │ │ │ │ ├── WalletPage.razor │ │ │ │ │ └── WalletPage.razor.cs │ │ │ │ │ └── WalletState.cs │ │ │ ├── GlobalSuppressions.cs │ │ │ ├── Hyperledger.Aries.AspNetCore.Client.csproj │ │ │ ├── InternalsVisibleToTest.cs │ │ │ ├── Pages │ │ │ │ ├── Authentication │ │ │ │ │ ├── ChangePasswordPage.razor │ │ │ │ │ ├── ChangePasswordPage.razor.cs │ │ │ │ │ ├── LoginPage.razor │ │ │ │ │ ├── LoginPage.razor.cs │ │ │ │ │ ├── LogoutPage.razor │ │ │ │ │ ├── LogoutPage.razor.cs │ │ │ │ │ ├── ProfilePage.razor │ │ │ │ │ └── ProfilePage.razor.cs │ │ │ │ └── Index.razor │ │ │ ├── Program.cs │ │ │ ├── _Imports.razor │ │ │ └── wwwroot │ │ │ │ ├── BlazorDualMode.js │ │ │ │ ├── InteropTest.js │ │ │ │ ├── android-chrome-192x192.png │ │ │ │ ├── android-chrome-512x512.png │ │ │ │ ├── apple-touch-icon.png │ │ │ │ ├── css │ │ │ │ ├── bootstrap │ │ │ │ │ ├── bootstrap.min.css │ │ │ │ │ └── bootstrap.min.css.map │ │ │ │ ├── open-iconic │ │ │ │ │ ├── FONT-LICENSE │ │ │ │ │ ├── ICON-LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ └── font │ │ │ │ │ │ ├── css │ │ │ │ │ │ └── open-iconic-bootstrap.min.css │ │ │ │ │ │ └── fonts │ │ │ │ │ │ ├── open-iconic.eot │ │ │ │ │ │ ├── open-iconic.otf │ │ │ │ │ │ ├── open-iconic.svg │ │ │ │ │ │ ├── open-iconic.ttf │ │ │ │ │ │ └── open-iconic.woff │ │ │ │ └── site.css │ │ │ │ ├── favicon-16x16.png │ │ │ │ ├── favicon-32x32.png │ │ │ │ ├── favicon.ico │ │ │ │ ├── images │ │ │ │ ├── favicon.png │ │ │ │ ├── hyperledger_logo.png │ │ │ │ └── logo.png │ │ │ │ └── site.webmanifest │ │ ├── Directory.Build.props │ │ └── Server │ │ │ ├── AriesWebAgent.cs │ │ │ ├── Configuration │ │ │ └── AgentSettings.cs │ │ │ ├── Extensions │ │ │ └── SubjectExtensions.cs │ │ │ ├── Features │ │ │ └── Identicon │ │ │ │ └── GetIdenticon │ │ │ │ └── GetIdenticonEndpoint.cs │ │ │ ├── GlobalSuppressions.cs │ │ │ ├── Hyperledger.Aries.AspNetCore.Server.csproj │ │ │ ├── Infrastructure │ │ │ └── MappingProfile.cs │ │ │ ├── InternalsVisibleToTest.cs │ │ │ ├── Pages │ │ │ └── _Host.cshtml │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ └── launchSettings.json │ │ │ ├── Startup.cs │ │ │ ├── appsettings.Alice.json │ │ │ ├── appsettings.Development.json │ │ │ ├── appsettings.json │ │ │ └── pool_genesis.txn │ ├── StartIndyPool.ps1 │ ├── TestCafe.ps1 │ ├── Tests │ │ ├── Client.Integration.Tests │ │ │ ├── Features │ │ │ │ ├── Application │ │ │ │ │ └── ApplicationState_Clone_Tests.cs │ │ │ │ └── Counter │ │ │ │ │ ├── CounterState_Clone_Tests.cs │ │ │ │ │ └── CounterState_IncrementCounter_Tests.cs │ │ │ ├── Hyperledger.Aries.AspNetCore.Client.Integration.Tests.csproj │ │ │ ├── Infrastructure │ │ │ │ ├── BaseTest.cs │ │ │ │ ├── ClientHost.cs │ │ │ │ ├── ClientHostBuilder.cs │ │ │ │ ├── ClientLoaderTestConfiguration.cs │ │ │ │ └── TestingConvention.cs │ │ │ ├── Pipeline │ │ │ │ └── CloneStateBehavior_Tests.cs │ │ │ └── Serialization │ │ │ │ ├── JsonSerializerOptions_Serialization_Tests.cs │ │ │ │ └── Person.cs │ │ ├── EndToEnd.TestCafe.Tests │ │ │ ├── .npmrc │ │ │ ├── Hyperledger.Aries.AspNetCore.EndToEnd.TestCafe.Tests.csproj │ │ │ ├── README.md │ │ │ ├── WeatherForecastPage.ts │ │ │ ├── package.json │ │ │ ├── tests │ │ │ │ ├── ChangeRouteShould.ts │ │ │ │ ├── CounterShouldCount.ts │ │ │ │ ├── ExecutionSide.ts │ │ │ │ └── WeatherForecastPage.ts │ │ │ └── util │ │ │ │ └── LocalStorage.ts │ │ └── Hyperledger.Aries.AspNetCore.Tests │ │ │ ├── Features │ │ │ ├── Connection │ │ │ │ ├── AcceptInvitation │ │ │ │ │ ├── AcceptInvitationEndpoint_Tests.cs │ │ │ │ │ ├── AcceptInvitationHandler_Tests.cs │ │ │ │ │ └── AcceptInvitationRequestValidator_Tests.cs │ │ │ │ ├── CreateInvitation │ │ │ │ │ ├── CreateInvitationEndpoint_Tests.cs │ │ │ │ │ ├── CreateInvitationHandler_Tests.cs │ │ │ │ │ ├── CreateInvitationRequestValidator_Tests.cs │ │ │ │ │ └── CreateInvitation_BaseTest.cs │ │ │ │ ├── DeleteConnection │ │ │ │ │ ├── DeleteConnectionEndpoint_Tests.cs │ │ │ │ │ ├── DeleteConnectionHandler_Tests.cs │ │ │ │ │ ├── DeleteConnectionRequestValidator_Tests.cs │ │ │ │ │ └── DeleteConnection_BaseTest.cs │ │ │ │ ├── GetConnection │ │ │ │ │ ├── GetConnectionEndpoint_Tests.cs │ │ │ │ │ ├── GetConnectionHandler_Tests.cs │ │ │ │ │ ├── GetConnectionRequestValidator_Tests.cs │ │ │ │ │ └── GetConnection_BaseTest.cs │ │ │ │ ├── GetConnections │ │ │ │ │ ├── GetConnectionsEndpoint_Tests.cs │ │ │ │ │ ├── GetConnectionsHandler_Tests.cs │ │ │ │ │ ├── GetConnectionsRequestValidator_Tests.cs │ │ │ │ │ └── GetConnections_BaseTest.cs │ │ │ │ ├── RecieveInvitation │ │ │ │ │ ├── ReceiveInvitation_BaseTest.cs │ │ │ │ │ ├── RecieveInvitationEndpoint_Tests.cs │ │ │ │ │ ├── RecieveInvitationHandler_Tests.cs │ │ │ │ │ └── RecieveInvitationRequestValidator_Tests.cs │ │ │ │ ├── SendMessage │ │ │ │ │ ├── SendMessageEndpoint_Tests.cs │ │ │ │ │ ├── SendMessageHandler_Tests.cs │ │ │ │ │ └── SendMessageRequestValidator_Tests.cs │ │ │ │ └── SendPing │ │ │ │ │ ├── SendPingEndpoint_Tests.cs │ │ │ │ │ ├── SendPingHandler_Tests.cs │ │ │ │ │ └── SendPingRequestValidator_Tests.cs │ │ │ ├── Credential │ │ │ │ ├── GetCredential │ │ │ │ │ ├── GetCredentialEndpoint_Tests.cs │ │ │ │ │ ├── GetCredentialHandler_Tests.cs │ │ │ │ │ └── GetCredentialRequestValidator_Tests.cs │ │ │ │ ├── GetCredentials │ │ │ │ │ ├── GetCredentialsEndpoint_Tests.cs │ │ │ │ │ ├── GetCredentialsHandler_Tests.cs │ │ │ │ │ ├── GetCredentialsRequestValidator_Tests.cs │ │ │ │ │ └── GetCredentials_BaseTest.cs │ │ │ │ └── RemoveCredential │ │ │ │ │ ├── RemoveCredentialEndpoint_Tests.cs │ │ │ │ │ ├── RemoveCredentialHandler_Tests.cs │ │ │ │ │ └── RemoveCredentialRequestValidator_Tests.cs │ │ │ ├── CredentialDefinition │ │ │ │ ├── CreateCredentialDefinition │ │ │ │ │ ├── CreateCredentialDefinitionEndpoint_Tests.cs │ │ │ │ │ ├── CreateCredentialDefinitionHandler_Tests.cs │ │ │ │ │ └── CreateCredentialDefinitionRequestValidator_Tests.cs │ │ │ │ ├── GetCredentialDefinition │ │ │ │ │ ├── GetCredentialDefinitionEndpoint_Tests.cs │ │ │ │ │ ├── GetCredentialDefinitionHandler_Tests.cs │ │ │ │ │ └── GetCredentialDefinitionRequestValidator_Tests.cs │ │ │ │ └── GetCredentialDefinitions │ │ │ │ │ ├── GetCredentialDefinitionsEndpoint_Tests.cs │ │ │ │ │ ├── GetCredentialDefinitionsHandler_Tests.cs │ │ │ │ │ └── GetCredentialDefinitionsRequestValidator_Tests.cs │ │ │ ├── Health │ │ │ │ └── GetHealth │ │ │ │ │ ├── GetHealthEndpoint_Tests.cs │ │ │ │ │ ├── GetHealthHandler_Tests.cs │ │ │ │ │ └── GetHealthRequestValidator_Tests.cs │ │ │ ├── IssueCredential │ │ │ │ └── OfferCredential │ │ │ │ │ ├── OfferCredentialEndpoint_Tests.cs │ │ │ │ │ ├── OfferCredentialHandler_Tests.cs │ │ │ │ │ └── OfferCredentialRequestValidator_Tests.cs │ │ │ ├── PresentProof │ │ │ │ ├── AcceptProofRequest │ │ │ │ │ ├── AcceptProofRequestEndpoint_Tests.cs │ │ │ │ │ ├── AcceptProofRequestHandler_Tests.cs │ │ │ │ │ └── AcceptProofRequestRequestValidator_Tests.cs │ │ │ │ ├── GetCredentialsForProof │ │ │ │ │ ├── GetCredentialsForProofEndpoint_Tests.cs │ │ │ │ │ ├── GetCredentialsForProofHandler_Tests.cs │ │ │ │ │ └── GetCredentialsForProofRequestValidator_Tests.cs │ │ │ │ ├── GetProof │ │ │ │ │ ├── GetProofEndpoint_Tests.cs │ │ │ │ │ ├── GetProofHandler_Tests.cs │ │ │ │ │ └── GetProofRequestValidator_Tests.cs │ │ │ │ ├── GetProofs │ │ │ │ │ ├── GetProofsEndpoint_Tests.cs │ │ │ │ │ ├── GetProofsHandler_Tests.cs │ │ │ │ │ └── GetProofsRequestValidator_Tests.cs │ │ │ │ └── SendRequestForProof │ │ │ │ │ ├── SendRequestForProofEndpoint_Tests.cs │ │ │ │ │ ├── SendRequestForProofHandler_Tests.cs │ │ │ │ │ └── SendRequestForProofRequestValidator_Tests.cs │ │ │ ├── Schema │ │ │ │ ├── CreateSchema │ │ │ │ │ ├── CreateSchemaEndpoint_Tests.cs │ │ │ │ │ ├── CreateSchemaHandler_Tests.cs │ │ │ │ │ └── CreateSchemaRequestValidator_Tests.cs │ │ │ │ ├── GetSchema │ │ │ │ │ ├── GetSchemaEndpoint_Tests.cs │ │ │ │ │ ├── GetSchemaHandler_Tests.cs │ │ │ │ │ └── GetSchemaRequestValidator_Tests.cs │ │ │ │ └── GetSchemas │ │ │ │ │ ├── GetSchemasEndpoint_Tests.cs │ │ │ │ │ ├── GetSchemasHandler_Tests.cs │ │ │ │ │ └── GetSchemasRequestValidator_Tests.cs │ │ │ └── Wallet │ │ │ │ ├── GetWallet │ │ │ │ ├── GetWalletEndpoint_Tests.cs │ │ │ │ ├── GetWalletHandler_Tests.cs │ │ │ │ ├── GetWalletRequestValidator_Tests.cs │ │ │ │ └── GetWallet_BaseTest.cs │ │ │ │ └── ResetWallet │ │ │ │ ├── ResetWalletEndpoint_Tests.cs │ │ │ │ ├── ResetWalletHandler_Tests.cs │ │ │ │ ├── ResetWalletRequestValidator_Tests.cs │ │ │ │ └── ResetWallet_BaseTest.cs │ │ │ ├── Hyperledger.Aries.AspNetCore.Server.Integration.Tests.csproj │ │ │ ├── Infrastructure │ │ │ ├── BaseTest.cs │ │ │ ├── Servers │ │ │ │ ├── AliceServer.cs │ │ │ │ └── FaberServer.cs │ │ │ ├── TestingConvention.cs │ │ │ └── WebApplicationFactories │ │ │ │ ├── AliceWebApplicationFactory.cs │ │ │ │ └── FaberWebApplicationFactory.cs │ │ │ └── WebApplicationFactoryTests │ │ │ ├── AliceWebApplicationFactory_Tests.cs │ │ │ └── FaberWebApplicationFactory │ │ │ ├── FaberWebApplicationFactory_Tests.cs │ │ │ └── FaberWebApplicationFactory_Wallet_Tests - Copy.cs │ ├── TimeWarp.ruleset │ ├── UNLICENSE.md │ ├── global.json │ └── pool_genesis.txn ├── routing │ ├── EdgeConsoleClient │ │ ├── Edge.Console.csproj │ │ └── Program.cs │ ├── MediatorAgentService │ │ ├── Mediator.Web.csproj │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── RoutingSample.sln └── xamarin-forms │ ├── AFMobileSample.Android │ ├── AFMobileSample.Android.csproj │ ├── Assets │ │ └── AboutAssets.txt │ ├── MainActivity.cs │ ├── Properties │ │ ├── AndroidManifest.xml │ │ └── AssemblyInfo.cs │ └── Resources │ │ ├── AboutResources.txt │ │ ├── Resource.designer.cs │ │ ├── layout │ │ ├── Tabbar.axml │ │ └── Toolbar.axml │ │ ├── mipmap-anydpi-v26 │ │ ├── icon.xml │ │ └── icon_round.xml │ │ ├── mipmap-hdpi │ │ ├── icon.png │ │ └── launcher_foreground.png │ │ ├── mipmap-mdpi │ │ ├── icon.png │ │ └── launcher_foreground.png │ │ ├── mipmap-xhdpi │ │ ├── icon.png │ │ └── launcher_foreground.png │ │ ├── mipmap-xxhdpi │ │ ├── icon.png │ │ └── launcher_foreground.png │ │ ├── mipmap-xxxhdpi │ │ ├── icon.png │ │ └── launcher_foreground.png │ │ └── values │ │ ├── colors.xml │ │ └── styles.xml │ ├── AFMobileSample.iOS │ ├── AFMobileSample.iOS.csproj │ ├── AppDelegate.cs │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon1024.png │ │ │ ├── Icon120.png │ │ │ ├── Icon152.png │ │ │ ├── Icon167.png │ │ │ ├── Icon180.png │ │ │ ├── Icon20.png │ │ │ ├── Icon29.png │ │ │ ├── Icon40.png │ │ │ ├── Icon58.png │ │ │ ├── Icon60.png │ │ │ ├── Icon76.png │ │ │ ├── Icon80.png │ │ │ └── Icon87.png │ ├── Entitlements.plist │ ├── Info.plist │ ├── Main.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── Resources │ │ ├── Default-568h@2x.png │ │ ├── Default-Portrait.png │ │ ├── Default-Portrait@2x.png │ │ ├── Default.png │ │ ├── Default@2x.png │ │ └── LaunchScreen.storyboard │ ├── AFMobileSample.sln │ ├── AFMobileSample │ ├── AFMobileSample.csproj │ ├── App.xaml │ ├── App.xaml.cs │ ├── MainPage.xaml │ └── MainPage.xaml.cs │ ├── libs-android │ └── README │ └── libs-ios │ └── README ├── scripts ├── start-node-pool.sh ├── start-web-agents.sh ├── stop-node-pool.sh ├── tester.sh └── web-agents-ngrok-config.yaml ├── src ├── Hyperledger.Aries.AspNetCore.Contracts │ ├── .editorconfig │ ├── AssemblyAnnotations.cs │ ├── Features │ │ ├── Base │ │ │ ├── BaseApiRequest.cs │ │ │ ├── BaseRequest.cs │ │ │ └── BaseResponse.cs │ │ ├── BasicMessaging │ │ │ ├── FeatureAnnotations.cs │ │ │ └── SendMessage │ │ │ │ ├── SendMessageRequest.cs │ │ │ │ ├── SendMessageRequestValidator.cs │ │ │ │ └── SendMessageResponse.cs │ │ ├── Connection │ │ │ ├── AcceptInvitation │ │ │ │ ├── AcceptInvitationRequest.cs │ │ │ │ ├── AcceptInvitationRequestValidator.cs │ │ │ │ └── AcceptInvitationResponse.cs │ │ │ ├── CreateInvitation │ │ │ │ ├── CreateInvitationRequest.cs │ │ │ │ ├── CreateInvitationRequestValidator.cs │ │ │ │ └── CreateInvitationResponse.cs │ │ │ ├── DeleteConnection │ │ │ │ ├── DeleteConnectionRequest.cs │ │ │ │ ├── DeleteConnectionRequestValidator.cs │ │ │ │ └── DeleteConnectionResponse.cs │ │ │ ├── FeatureAnnotations.cs │ │ │ ├── GetConnection │ │ │ │ ├── GetConnectionRequest.cs │ │ │ │ ├── GetConnectionRequestValidator.cs │ │ │ │ └── GetConnectionResponse.cs │ │ │ ├── GetConnections │ │ │ │ ├── GetConnectionsRequest.cs │ │ │ │ ├── GetConnectionsRequestValidator.cs │ │ │ │ └── GetConnectionsResponse.cs │ │ │ ├── ReceiveInvitation │ │ │ │ ├── ReceiveInvitationRequest.cs │ │ │ │ ├── ReceiveInvitationRequestValidator.cs │ │ │ │ └── ReceiveInvitationResponse.cs │ │ │ ├── SendPing │ │ │ │ ├── SendPingRequest.cs │ │ │ │ ├── SendPingRequestValidator.cs │ │ │ │ └── SendPingResponse.cs │ │ │ └── _._ │ │ ├── Credential │ │ │ ├── FeatureAnnotations.cs │ │ │ ├── GetCredential │ │ │ │ ├── GetCredentialRequest.cs │ │ │ │ ├── GetCredentialRequestValidator.cs │ │ │ │ └── GetCredentialResponse.cs │ │ │ ├── GetCredentials │ │ │ │ ├── GetCredentialsRequest.cs │ │ │ │ ├── GetCredentialsRequestValidator.cs │ │ │ │ └── GetCredentialsResponse.cs │ │ │ └── RemoveCredential │ │ │ │ ├── RemoveCredentialRequest.cs │ │ │ │ ├── RemoveCredentialRequestValidator.cs │ │ │ │ └── RemoveCredentialResponse.cs │ │ ├── CredentialDefinition │ │ │ ├── CreateCredentialDefinition │ │ │ │ ├── CreateCredentialDefinitionRequest.cs │ │ │ │ ├── CreateCredentialDefinitionRequestValidator.cs │ │ │ │ └── CreateCredentialDefinitionResponse.cs │ │ │ ├── FeatureAnnotations.cs │ │ │ ├── GetCredentialDefinition │ │ │ │ ├── GetCredentialDefinitionRequest.cs │ │ │ │ ├── GetCredentialDefinitionRequestValidator.cs │ │ │ │ └── GetCredentialDefinitionResponse.cs │ │ │ └── GetCredentialDefinitions │ │ │ │ ├── GetCredentialDefinitionsRequest.cs │ │ │ │ ├── GetCredentialDefinitionsRequestValidator.cs │ │ │ │ └── GetCredentialDefinitionsResponse.cs │ │ ├── Infrastructure │ │ │ └── InternalsVisibleToClientAndServer.cs │ │ ├── Introduction │ │ │ └── _._ │ │ ├── IssueCredential │ │ │ ├── FeatureAnnotations.cs │ │ │ └── OfferCredential │ │ │ │ ├── OfferCredentialRequest.cs │ │ │ │ ├── OfferCredentialRequestValidator.cs │ │ │ │ └── OfferCredentialResponse.cs │ │ ├── Ledger │ │ │ └── _._ │ │ ├── PresentProof │ │ │ ├── AcceptProofRequest │ │ │ │ ├── AcceptProofRequestRequest.cs │ │ │ │ ├── AcceptProofRequestRequestValidator.cs │ │ │ │ └── AcceptProofRequestResponse.cs │ │ │ ├── CreateProof │ │ │ │ ├── CreateProofRequestRequest.cs │ │ │ │ ├── CreateProofRequestRequestValidator.cs │ │ │ │ └── CreateProofRequestResponse.cs │ │ │ ├── FeatureAnnotations.cs │ │ │ ├── GetCredentialsForProof │ │ │ │ ├── GetCredentialsForProofRequest.cs │ │ │ │ ├── GetCredentialsForProofRequestValidator.cs │ │ │ │ └── GetCredentialsForProofResponse.cs │ │ │ ├── GetProof │ │ │ │ ├── GetProofRequest.cs │ │ │ │ ├── GetProofRequestValidator.cs │ │ │ │ └── GetProofResponse.cs │ │ │ └── GetProofs │ │ │ │ ├── GetProofsRequest.cs │ │ │ │ ├── GetProofsRequestValidator.cs │ │ │ │ └── GetProofsResponse.cs │ │ ├── Revocation │ │ │ └── _._ │ │ ├── Schema │ │ │ ├── CreateSchema │ │ │ │ ├── CreateSchemaRequest.cs │ │ │ │ ├── CreateSchemaRequestValidator.cs │ │ │ │ └── CreateSchemaResponse.cs │ │ │ ├── FeatureAnnotations.cs │ │ │ ├── GetSchema │ │ │ │ ├── GetSchemaRequest.cs │ │ │ │ ├── GetSchemaRequestValidator.cs │ │ │ │ └── GetSchemaResponse.cs │ │ │ └── GetSchemas │ │ │ │ ├── GetSchemasRequest.cs │ │ │ │ ├── GetSchemasRequestValidator.cs │ │ │ │ └── GetSchemasResponse.cs │ │ ├── TrustPing │ │ │ └── _._ │ │ └── Wallet │ │ │ ├── FeatureAnnotations.cs │ │ │ ├── GetWallet │ │ │ ├── GetWalletRequest.cs │ │ │ ├── GetWalletRequestValidator.cs │ │ │ └── GetWalletResponse.cs │ │ │ └── ResetWallet │ │ │ ├── ResetWalletRequest.cs │ │ │ ├── ResetWalletRequestValidator.cs │ │ │ └── ResetWalletResponse.cs │ └── Hyperledger.Aries.AspNetCore.Contracts.csproj ├── Hyperledger.Aries.AspNetCore │ ├── .editorconfig │ ├── AgentMiddleware.cs │ ├── Extensions │ │ ├── ApplicationBuilderExtensions.cs │ │ ├── AriesOpenApiOptions.cs │ │ └── MvcBuilderExtensions.cs │ ├── Features │ │ ├── Base │ │ │ ├── BaseEndpoint.cs │ │ │ ├── BaseError.cs │ │ │ └── BaseException.cs │ │ ├── BasicMessage │ │ │ └── SendMessage │ │ │ │ ├── SendMessageEndpoint.cs │ │ │ │ └── SendMessageHandler.cs │ │ ├── Connection │ │ │ ├── AcceptInvitation │ │ │ │ ├── AcceptInvitationEndpoint.cs │ │ │ │ └── AcceptInvitationHandler.cs │ │ │ ├── CreateInvitation │ │ │ │ ├── CreateInvitationEndpoint.cs │ │ │ │ └── CreateInvitationHandler.cs │ │ │ ├── DeleteConnection │ │ │ │ ├── DeleteConnectionEndpoint.cs │ │ │ │ └── DeleteConnectionHandler.cs │ │ │ ├── GetConnection │ │ │ │ ├── GetConnectionEndpoint.cs │ │ │ │ └── GetConnectionHandler.cs │ │ │ ├── GetConnections │ │ │ │ ├── GetConnectionsEndpoint.cs │ │ │ │ └── GetConnectionsHandler.cs │ │ │ ├── ReceiveInvitation │ │ │ │ ├── ReceiveInvitationEndpoint.cs │ │ │ │ └── ReceiveInvitationHandler.cs │ │ │ └── SendPing │ │ │ │ ├── SendPingEndpoint.cs │ │ │ │ └── SendPingHandler.cs │ │ ├── Credential │ │ │ ├── GetCredential │ │ │ │ ├── GetCredentialEndpoint.cs │ │ │ │ └── GetCredentialHandler.cs │ │ │ ├── GetCredentials │ │ │ │ ├── GetCredentialsEndpoint.cs │ │ │ │ └── GetCredentialsHandler.cs │ │ │ └── RemoveCredential │ │ │ │ ├── RemoveCredentialEndpoint.cs │ │ │ │ └── RemoveCredentialHandler.cs │ │ ├── CredentialDefinition │ │ │ ├── CreateCredentialDefinition │ │ │ │ ├── CreateCredentialDefinitionEndpoint.cs │ │ │ │ └── CreateCredentialDefinitionHandler.cs │ │ │ ├── GetCredentialDefinition │ │ │ │ ├── GetCredentialDefinitionEndpoint.cs │ │ │ │ └── GetCredentialDefinitionHandler.cs │ │ │ └── GetCredentialDefinitions │ │ │ │ ├── GetCredentialDefinitionsEndpoint.cs │ │ │ │ └── GetCredentialDefinitionsHandler.cs │ │ ├── Introduction │ │ │ └── _._ │ │ ├── IssueCredential │ │ │ └── OfferCredential │ │ │ │ ├── OfferCredentialEndpoint.cs │ │ │ │ └── OfferCredentialHandler.cs │ │ ├── Ledger │ │ │ └── _._ │ │ ├── PresentProof │ │ │ ├── AcceptProofRequest │ │ │ │ ├── AcceptProofRequestEndpoint.cs │ │ │ │ └── AcceptProofRequestHandler.cs │ │ │ ├── CreateProofRequest │ │ │ │ ├── CreateProofRequestEndpoint.cs │ │ │ │ └── CreateProofRequestsHandler.cs │ │ │ ├── GetCredentialsForProof │ │ │ │ ├── GetCredentialsForProofEndpoint.cs │ │ │ │ └── GetCredentialsForProofHandler.cs │ │ │ ├── GetProof │ │ │ │ ├── GetProofEndpoint.cs │ │ │ │ └── GetProofHandler.cs │ │ │ └── GetProofs │ │ │ │ ├── GetProofsEndpoint.cs │ │ │ │ └── GetProofsHandler.cs │ │ ├── Revocation │ │ │ └── _._ │ │ ├── Schema │ │ │ ├── CreateSchema │ │ │ │ ├── CreateSchemaEndpoint.cs │ │ │ │ └── CreateSchemaHandler.cs │ │ │ ├── GetSchema │ │ │ │ ├── GetSchemaEndpoint.cs │ │ │ │ └── GetSchemaHandler.cs │ │ │ └── GetSchemas │ │ │ │ ├── GetSchemasEndpoint.cs │ │ │ │ └── GetSchemasHandler.cs │ │ ├── TrustPing │ │ │ └── _._ │ │ └── Wallet │ │ │ ├── GetWallet │ │ │ ├── GetWalletEndpoint.cs │ │ │ └── GetWalletHandler.cs │ │ │ └── ResetWallet │ │ │ ├── ResetWalletEndpoint.cs │ │ │ └── ResetWalletHandler.cs │ ├── Hyperledger.Aries.AspNetCore.csproj │ └── TailsMiddleware.cs ├── Hyperledger.Aries.Payments.SovrinToken │ ├── AgentBuilderExtensions.cs │ ├── AnyAgentMessage.cs │ ├── GlobalSuppressions.cs │ ├── Hyperledger.Aries.Payments.SovrinToken.csproj │ ├── PaymentUtils.cs │ ├── PaymentsAgentMiddleware.cs │ ├── SovrinPaymentService.cs │ ├── SovrinTokenConfigurationService.cs │ └── TokenConfiguration.cs ├── Hyperledger.Aries.Routing.Edge │ ├── AriesFrameworkBuilderExtensions.cs │ ├── EdgeClientService.Backup.cs │ ├── EdgeClientService.cs │ ├── EdgeConnectionService.cs │ ├── EdgeProvisioningService.cs │ ├── Hyperledger.Aries.Routing.Edge.csproj │ ├── IEdgeClientService.cs │ └── IEdgeProvisioningService.cs ├── Hyperledger.Aries.Routing.Mediator │ ├── AriesFrameworkBuilderExtensions.cs │ ├── DefaultRoutingStore.cs │ ├── Handlers │ │ ├── MediatorForwardHandler.cs │ │ ├── RetrieveBackupHandler.cs │ │ ├── RoutingInboxHandler.cs │ │ └── StoreBackupHandler.cs │ ├── Hyperledger.Aries.Routing.Mediator.csproj │ ├── IRoutingStore.cs │ ├── MediatorAgent.cs │ ├── MediatorDiscoveryMiddleware.cs │ ├── MediatorProvisioningService.cs │ ├── Records │ │ ├── DeviceInfoRecord.cs │ │ ├── InboxItemRecord.cs │ │ ├── InboxRecord.cs │ │ └── RouteRecord.cs │ └── Storage │ │ ├── DefaultStorageService.cs │ │ └── IStorageService.cs ├── Hyperledger.Aries.Routing │ ├── AddDeviceInfoMessage.cs │ ├── AddRouteMessage.cs │ ├── AgentPublicConfiguration.cs │ ├── BackupTypeNames.cs │ ├── CreateInboxMessage.cs │ ├── CreateInboxResponseMessage.cs │ ├── DeleteInboxItemsMessage.cs │ ├── GetInboxItemsMessage.cs │ ├── GetInboxItemsResponseMessage.cs │ ├── Hyperledger.Aries.Routing.csproj │ ├── InboxItemEvent.cs │ ├── InboxItemMessage.cs │ ├── ListBackupsAgentMessage.cs │ ├── ListBackupsResponseAgentMessage.cs │ ├── RestoreInboxMessage.cs │ ├── RetrieveBackupAgentMessage.cs │ ├── RetrieveBackupResponseAgentMessage.cs │ ├── RoutingTypeNames.cs │ ├── StoreBackupAgentMessage.cs │ ├── StoreBackupResponseAgentMessage.cs │ ├── UpsertDeviceInfoMessage.cs │ └── Utils.cs ├── Hyperledger.Aries.TestHarness │ ├── AgentScenarios.cs │ ├── Hyperledger.Aries.TestHarness.csproj │ ├── Mock │ │ ├── InProcAgent.cs │ │ ├── InProcMessageHandler.cs │ │ ├── MockAgent.cs │ │ ├── MockAgentHttpHandler.cs │ │ ├── MockAgentMessageProcessor.cs │ │ ├── MockAgentRouter.cs │ │ └── MockUtils.cs │ ├── Scenarios.cs │ ├── TestConstants.cs │ ├── TestSingleWallet.cs │ └── Utils │ │ ├── AgentUtils.cs │ │ ├── PoolUtils.cs │ │ ├── ProofServiceUtils.cs │ │ └── ServiceUtils.cs ├── Hyperledger.Aries.sln └── Hyperledger.Aries │ ├── Agents │ ├── Abstractions │ │ ├── IAgent.cs │ │ ├── IAgentContext.cs │ │ ├── IAgentMiddleware.cs │ │ ├── IAgentProvider.cs │ │ └── IMessageHandler.cs │ ├── AgentBase.cs │ ├── AgentContext.cs │ ├── Converters │ │ ├── AgentEndpointJsonConverter.cs │ │ ├── AgentMessageReader.cs │ │ └── AgentMessageWriter.cs │ ├── DefaultAgent.cs │ ├── DefaultAgentContext.cs │ ├── DefaultAgentProvider.cs │ ├── Extensions │ │ ├── AgentFrameworkBuilderExtensions.cs │ │ ├── AgentsExtensions.cs │ │ └── ServiceCollectionExtensions.cs │ ├── MessageHandlerBase.cs │ ├── MessageType.cs │ ├── MessageTypes.cs │ ├── MessageTypesHttps.cs │ ├── Models │ │ ├── AgentEndpoint.cs │ │ ├── AgentMessage.cs │ │ ├── AgentOwner.cs │ │ ├── MessageContext.cs │ │ ├── PackedMessageContext.cs │ │ └── UnpackedMessageContext.cs │ └── Transport │ │ ├── DefaultMessageService.cs │ │ ├── HttpMessageDispatcher.cs │ │ ├── IMessageDispatcher.cs │ │ ├── IMessageService.cs │ │ └── MessageServiceExtensions.cs │ ├── Common │ ├── AcknowledgeMessage.cs │ ├── AcknowledgementStatusConstants.cs │ ├── AgentFrameworkException.cs │ ├── ErrorCode.cs │ ├── EventAggregator.cs │ ├── FormattingExtensions.cs │ ├── IEventAggregator.cs │ ├── LoggingEvents.cs │ ├── MediaTypes.cs │ └── ServiceMessageProcessingEvent.cs │ ├── Configuration │ ├── AgentOptions.cs │ ├── AriesFrameworkBuilder.cs │ ├── DefaultProvisioningHostedService.cs │ ├── DefaultProvisioningService.cs │ ├── IProvisioningService.cs │ ├── PoolConfigurationService.cs │ ├── ProvisioningRecord.cs │ ├── ServiceCollectionExtensions.cs │ └── TxnAuthorAcceptanceService.cs │ ├── Decorators │ ├── Attachments │ │ ├── AttachDecorator.cs │ │ ├── AttachExtensions.cs │ │ ├── Attachment.cs │ │ ├── AttachmentContent.cs │ │ ├── AttachmentContentExtensions.cs │ │ └── JsonWebSignature.cs │ ├── DecoratorExtensions.cs │ ├── Decorators.cs │ ├── Payments │ │ ├── PaymentReceiptDecorator.cs │ │ └── PaymentRequestDecorator.cs │ ├── PleaseAck │ │ ├── OnValues.cs │ │ └── PleaseAckDecorator.cs │ ├── Service │ │ ├── ServiceDecorator.cs │ │ └── ServiceDecoratorExtensions.cs │ ├── Signature │ │ ├── SignatureDecorator.cs │ │ └── SignatureUtils.cs │ ├── Threading │ │ ├── ThreadDecorator.cs │ │ └── ThreadDecoratorExtensions.cs │ └── Transport │ │ ├── TransportDecorator.cs │ │ └── TransportDecoratorExtensions.cs │ ├── Features │ ├── BasicMessage │ │ ├── BasicMessage.cs │ │ ├── BasicMessageRecord.cs │ │ ├── DefaultBasicMessageHandler.cs │ │ ├── DefaultBasicMessageService.cs │ │ └── IBasicMessageService.cs │ ├── Discovery │ │ ├── DefaultDiscoveryHandler.cs │ │ ├── DefaultDiscoveryService.cs │ │ ├── DiscoveryDiscloseMessage.cs │ │ ├── DiscoveryQueryMessage.cs │ │ └── IDiscoveryService.cs │ ├── Handshakes │ │ ├── Common │ │ │ ├── Connection.cs │ │ │ ├── ConnectionAlias.cs │ │ │ ├── ConnectionRecord.cs │ │ │ └── Dids │ │ │ │ ├── DidCommServiceEndpoint.cs │ │ │ │ ├── DidDoc.cs │ │ │ │ ├── DidDocExtensions.cs │ │ │ │ ├── DidDocKey.cs │ │ │ │ ├── DidDocServiceEndpointTypes.cs │ │ │ │ ├── DidDocServiceEndpointsConverter.cs │ │ │ │ ├── IDidDocServiceEndpoint.cs │ │ │ │ └── IndyAgentDidDocService.cs │ │ ├── Connection │ │ │ ├── DefaultConnectionHandler.cs │ │ │ ├── DefaultConnectionService.cs │ │ │ ├── Extensions │ │ │ │ └── ConnectionServiceExtensions.cs │ │ │ ├── IConnectionService.cs │ │ │ └── Models │ │ │ │ ├── ConnectionAcknowledgeMessage.cs │ │ │ │ ├── ConnectionInvitationMessage.cs │ │ │ │ ├── ConnectionRequestMessage.cs │ │ │ │ ├── ConnectionResponseMessage.cs │ │ │ │ └── InviteConfiguration.cs │ │ ├── DidExchange │ │ │ ├── DefaultDidExchangeHandler.cs │ │ │ ├── DefaultDidExchangeService.cs │ │ │ ├── IDidExchangeService.cs │ │ │ └── Models │ │ │ │ ├── DidExchangeCompleteMessage.cs │ │ │ │ ├── DidExchangeProblemReportMessage.cs │ │ │ │ ├── DidExchangeRequestMessage.cs │ │ │ │ └── DidExchangeResponseMessage.cs │ │ ├── HandshakeConstants.cs │ │ └── HandshakeProtocol.cs │ ├── IssueCredential │ │ ├── Abstractions │ │ │ ├── ICredentialService.cs │ │ │ ├── ISchemaService.cs │ │ │ └── ITailsService.cs │ │ ├── CredentialServiceExtensions.cs │ │ ├── DefaultCredentialHandler.cs │ │ ├── DefaultCredentialService.cs │ │ ├── DefaultSchemaService.cs │ │ ├── DefaultTailsService.cs │ │ ├── Models │ │ │ ├── Credential.cs │ │ │ ├── CredentialDefinitionConfiguration.cs │ │ │ ├── CredentialInfo.cs │ │ │ ├── CredentialMimeTypes.cs │ │ │ ├── CredentialPreviewAttribute.cs │ │ │ ├── CredentialPreviewAttributeConverter.cs │ │ │ ├── Messages │ │ │ │ ├── CredentialAcknowledgeMessage.cs │ │ │ │ ├── CredentialIssueMessage.cs │ │ │ │ ├── CredentialOfferMessage.cs │ │ │ │ ├── CredentialPreviewMessage.cs │ │ │ │ ├── CredentialProposalMessage.cs │ │ │ │ └── CredentialRequestMessage.cs │ │ │ └── OfferConfiguration.cs │ │ └── Records │ │ │ ├── CredentialRecord.cs │ │ │ ├── CredentialState.cs │ │ │ ├── CredentialTrigger.cs │ │ │ ├── DefinitionRecord.cs │ │ │ ├── RevocationRegistryRecord.cs │ │ │ └── SchemaRecord.cs │ ├── OutOfBand │ │ ├── DefaultOutOfBandHandler.cs │ │ ├── DefaultOutOfBandService.cs │ │ ├── HandshakeReuseAcceptedMessage.cs │ │ ├── HandshakeReuseMessage.cs │ │ ├── IOutOfBandService.cs │ │ ├── InvitationMessage.cs │ │ └── InvitationMessageExtensions.cs │ ├── PresentProof │ │ ├── DefaultProofHandler.cs │ │ ├── DefaultProofService.cs │ │ ├── IProofService.cs │ │ ├── Messages │ │ │ ├── PresentationAcknowledgeMessage.cs │ │ │ ├── PresentationMessage.cs │ │ │ ├── PresentationPreviewMessage.cs │ │ │ ├── ProposePresentationMessage.cs │ │ │ └── RequestPresentationMessage.cs │ │ ├── Models │ │ │ ├── AttributeFilterConverter.cs │ │ │ ├── PartialProof.cs │ │ │ ├── ProofAttribute.cs │ │ │ ├── ProofAttributeInfo.cs │ │ │ ├── ProofIdentifier.cs │ │ │ ├── ProofPredicateInfo.cs │ │ │ ├── ProofProposal.cs │ │ │ ├── ProofRequest.cs │ │ │ ├── ProofRequestConfiguration.cs │ │ │ ├── ProofRequestParameters.cs │ │ │ ├── RequestedAttribute.cs │ │ │ ├── RequestedCredentials.cs │ │ │ ├── RequestedProof.cs │ │ │ └── RevocationInterval.cs │ │ ├── ProofRecord.cs │ │ └── ProofServiceExtensions.cs │ ├── ProblemReport │ │ ├── ProblemImpact.cs │ │ ├── ProblemReportMessage.cs │ │ └── RetryParty.cs │ ├── RevocationNotification │ │ ├── DefaultRevocationNotificationHandler.cs │ │ ├── DefaultRevocationNotificationService.cs │ │ ├── IRevocationNotificationService.cs │ │ ├── RevocationNotificationAcknowledgeMessage.cs │ │ └── RevocationNotificationMessage.cs │ ├── Routing │ │ ├── DefaultForwardHandler.cs │ │ └── ForwardMessage.cs │ └── TrustPing │ │ ├── DefaultTrustPingHandler.cs │ │ ├── TrustPingMessage.cs │ │ └── TrustPingResponseMessage.cs │ ├── Hyperledger.Aries.csproj │ ├── Ledger │ ├── Abstractions │ │ ├── ILedgerService.cs │ │ ├── ILedgerSigningService.cs │ │ └── IPoolService.cs │ ├── DefaultLedgerService.cs │ ├── DefaultLedgerSigningService.cs │ ├── DefaultPoolService.cs │ ├── Models │ │ ├── AuthorizationConstraint.cs │ │ ├── AuthorizationRule.cs │ │ ├── ConstraintMetadata.cs │ │ ├── CredDefId.cs │ │ ├── IndyAml.cs │ │ ├── IndyTaa.cs │ │ ├── IndyTaaAcceptance.cs │ │ ├── ParseRegistryResponseResult.cs │ │ ├── ParseResponseResult.cs │ │ ├── PoolAwaitable.cs │ │ ├── SchemaId.cs │ │ ├── ServiceEndpointResult.cs │ │ ├── TransactionActions.cs │ │ └── TransactionTypes.cs │ └── V2 │ │ ├── DefaultLedgerServiceV2.cs │ │ ├── DefaultPoolServiceV2.cs │ │ └── ResponseParser.cs │ ├── Payments │ ├── DefaultPaymentService.cs │ ├── IPaymentService.cs │ ├── Models │ │ ├── AddressOptions.cs │ │ ├── IndyPaymentInputSource.cs │ │ ├── IndyPaymentOutputSource.cs │ │ ├── PaymentAmount.cs │ │ ├── PaymentDetails.cs │ │ ├── PaymentItem.cs │ │ ├── PaymentMethod.cs │ │ ├── PaymentMethodData.cs │ │ └── TransactionCost.cs │ ├── PaymentAddressRecord.cs │ └── PaymentRecord.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── Signatures │ ├── DefaultSigningService.cs │ └── ISigningService.cs │ ├── Storage │ ├── DefaultWalletRecordService.cs │ ├── DefaultWalletService.cs │ ├── IWalletRecordService.cs │ ├── IWalletService.cs │ ├── Models │ │ ├── WalletConfiguration.cs │ │ ├── WalletCredentials.cs │ │ └── WalletStorageConfiguration.cs │ └── Records │ │ ├── RecordBase.cs │ │ └── Search │ │ ├── SearchItem.cs │ │ ├── SearchOptions.cs │ │ ├── SearchQuery.cs │ │ └── SearchResult.cs │ └── Utils │ ├── Base64UrlEncoder.cs │ ├── CredentialUtils.cs │ ├── CryptoUtils.cs │ ├── DidUtils.cs │ ├── EnvironmentUtils.cs │ ├── MessageUtils.cs │ ├── ResilienceUtils.cs │ └── TagConstants.cs └── test ├── .editorconfig └── Hyperledger.Aries.Tests ├── ConfigurationTests.cs ├── ConnectionRecordVersioningTests.cs ├── ConverterTests.cs ├── Decorators ├── AttachmentContentTests.cs ├── AttachmentDecoratorTests.cs ├── SignatorDecoratorTests.cs ├── ThreadingDecoratorTests.cs └── TransportDecoratorTests.cs ├── DidCommServiceTests.cs ├── DidDocTests.cs ├── DidUtilsTests.cs ├── EventAggregatorTests.cs ├── GlobalSuppressions.cs ├── Hyperledger.Aries.Tests.csproj ├── InProcAgentTests.cs ├── Integration ├── ConnectionTests.cs ├── CredentialTests.cs ├── DidExchangeTests.cs ├── DiscoveryTests.cs ├── MessageTypesTests.cs ├── OutOfBandTests.cs └── ProofTests.cs ├── LedgerServiceTests.cs ├── MessageServiceTests.cs ├── MessageUtilsTests.cs ├── MockExtendedConnectionService.cs ├── MockMessageHandler.cs ├── Payments ├── PaymentTests.cs ├── ProtocolTests.cs └── TransferTests.cs ├── PoolServiceTests.cs ├── Protocols ├── ConnectionTests.cs ├── CredentialTests.cs ├── CredentialTransientTests.cs ├── CredentialUtilsTests.cs ├── CredentialV1Tests.cs ├── DidExchangeTests.cs ├── DiscoveryTests.cs ├── OutOfBandTests.cs ├── ProofTests.cs └── RevocationTests.cs ├── ProvisioningServiceTests.cs ├── RecordTests.cs ├── Routing ├── BackupTests.cs ├── RoutingInboxHandlerTests.cs ├── RoutingTests.cs └── WalletBackupTests.cs ├── RuntimeTests.cs ├── SchemaServiceTests.cs ├── SearchTests.cs ├── StateMachineTests.cs ├── Storage └── Models │ └── WalletStorageConfigurationTest.cs ├── Utils.cs ├── WalletTests.cs └── pool_genesis.txn /.dockerignore: -------------------------------------------------------------------------------- 1 | .dockerignore 2 | .env 3 | .git 4 | .gitignore 5 | .vs 6 | .vscode 7 | */bin 8 | */obj 9 | **/.toolstarget 10 | */.vs -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | **Is your feature request related to a problem? Please describe.** 8 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 9 | 10 | **Describe the solution you'd like** 11 | A clear and concise description of what you want to happen. 12 | 13 | **Describe alternatives you've considered** 14 | A clear and concise description of any alternative solutions or features you've considered. 15 | 16 | **Additional context** 17 | Add any other context or screenshots about the feature request here. 18 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | #### Short description of what this resolves: 2 | 3 | 4 | #### Changes proposed in this pull request: 5 | 6 | - 7 | - 8 | - 9 | 10 | **Fixes**: # 11 | -------------------------------------------------------------------------------- /.github/settings.yml: -------------------------------------------------------------------------------- 1 | repository: 2 | archived: true -------------------------------------------------------------------------------- /MAINTAINERS.md: -------------------------------------------------------------------------------- 1 | ## Maintainers 2 | 3 | ### Active Maintainers 4 | | name | Github | Discord | 5 | |--------------------|------------------------------------------------------|---------------------| 6 | | Sebastian Bickerle | [@ntsbs](https://github.com/ntsbs) | Sebastian#1169 | 7 | | Christopher Hempel | [@CHempel-esatus](https://github.com/CHempel-esatus) | CHempel_esatus#6640 | 8 | -------------------------------------------------------------------------------- /docker-compose.test.yaml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | indy-pool: 4 | build: 5 | context: . 6 | dockerfile: docker/indy-pool.dockerfile 7 | args: 8 | pool_ip: 10.0.0.10 9 | networks: 10 | agent_net: 11 | ipv4_address: 10.0.0.10 12 | 13 | test-agent: 14 | build: 15 | context: . 16 | dockerfile: docker/test-agent.dockerfile 17 | depends_on: 18 | - "indy-pool" 19 | networks: 20 | agent_net: 21 | ipv4_address: 10.0.0.14 22 | 23 | networks: 24 | agent_net: 25 | driver: bridge 26 | ipam: 27 | config: 28 | - subnet: 10.0.0.0/16 29 | -------------------------------------------------------------------------------- /docker/commands.txt: -------------------------------------------------------------------------------- 1 | docker build -f indy-pool.dockerfile -t indy_pool . 2 | docker run -itd -p 9701-9709:9701-9709 indy_pool 3 | 4 | Run tests in PowerShell 5 | Get-ChildItem ".\test\" -recurse | where {$_.extension -eq ".csproj"} | % { dotnet test $_.FullName --verbosity normal } 6 | 7 | Run tests in Bash 8 | ls test/**/*.csproj | xargs -L1 dotnet test --verbosity normal -------------------------------------------------------------------------------- /docker/test-agent.dockerfile: -------------------------------------------------------------------------------- 1 | FROM streetcred/dotnet-indy:1.14.2 2 | WORKDIR /app 3 | 4 | COPY . . 5 | RUN dotnet restore "test/Hyperledger.Aries.Tests/Hyperledger.Aries.Tests.csproj" 6 | 7 | COPY docker/docker_pool_genesis.txn test/Hyperledger.Aries.Tests/pool_genesis.txn 8 | 9 | WORKDIR /app/test/Hyperledger.Aries.Tests 10 | 11 | ENTRYPOINT ["dotnet", "test", "--verbosity", "normal"] -------------------------------------------------------------------------------- /docker/web-agent.dockerfile: -------------------------------------------------------------------------------- 1 | FROM streetcred/dotnet-indy:1.14.2 AS base 2 | WORKDIR /app 3 | 4 | FROM streetcred/dotnet-indy:1.14.2 AS build 5 | WORKDIR /src 6 | COPY [".", "."] 7 | 8 | WORKDIR /src/samples/aspnetcore 9 | RUN dotnet restore "WebAgent.csproj" \ 10 | -s "https://api.nuget.org/v3/index.json" 11 | 12 | COPY ["samples/aspnetcore/", "."] 13 | COPY ["docker/docker_pool_genesis.txn", "./pool_genesis.txn"] 14 | RUN dotnet build "WebAgent.csproj" -c Release -o /app 15 | 16 | FROM build AS publish 17 | RUN dotnet publish "WebAgent.csproj" -c Release -o /app 18 | 19 | FROM base AS final 20 | WORKDIR /app 21 | COPY --from=publish /app . 22 | 23 | ENTRYPOINT ["dotnet", "WebAgent.dll"] -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | SOURCEDIR = . 8 | BUILDDIR = _build 9 | 10 | # Put it first so that "make" without argument is like "make help". 11 | help: 12 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 13 | 14 | .PHONY: help Makefile 15 | 16 | # Catch-all target: route all unknown targets to Sphinx using the new 17 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 18 | %: Makefile 19 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -------------------------------------------------------------------------------- /docs/_static/custom.css: -------------------------------------------------------------------------------- 1 | .toggle .header { 2 | display: block; 3 | clear: both; 4 | cursor: pointer; 5 | } 6 | 7 | .toggle .header:after { 8 | content: " ▶"; 9 | } 10 | 11 | .toggle .header.open:after { 12 | content: " ▼"; 13 | } -------------------------------------------------------------------------------- /docs/_static/images/choose_template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/docs/_static/images/choose_template.png -------------------------------------------------------------------------------- /docs/_static/images/configure_agent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/docs/_static/images/configure_agent.png -------------------------------------------------------------------------------- /docs/_static/images/target_framework.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/docs/_static/images/target_framework.png -------------------------------------------------------------------------------- /docs/_templates/page.html: -------------------------------------------------------------------------------- 1 | {% extends "!page.html" %} 2 | 3 | {% block footer %} 4 | 14 | {% endblock %} -------------------------------------------------------------------------------- /docs/errors.rst: -------------------------------------------------------------------------------- 1 | ************************** 2 | Common Errors and Problems 3 | ************************** 4 | 5 | System.DllNotFoundException 6 | =========================== 7 | 8 | Problem 9 | Runtime exception thrown 10 | 11 | .. code-block:: bash 12 | 13 | System.DllNotFoundException : Unable to load shared library 'libindy' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libsovtoken, 1): image not found 14 | 15 | Solution 16 | Missing static library. Check the installation section for guidance on how to add static libraries to your environment. -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdk": { 3 | "version": "3.1.101", 4 | "rollForward": "latestFeature" 5 | } 6 | } -------------------------------------------------------------------------------- /nuget.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /samples/aspnetcore/Models/AcceptConnectionViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace WebAgent.Models 4 | { 5 | public class AcceptConnectionViewModel 6 | { 7 | [Required] 8 | public string InvitationDetails { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /samples/aspnetcore/Models/ConnectionsViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Hyperledger.Aries.Features.DidExchange; 3 | using WebAgent.Protocols.BasicMessage; 4 | 5 | namespace WebAgent.Models 6 | { 7 | public class ConnectionsViewModel 8 | { 9 | public IEnumerable Connections { get; set; } 10 | 11 | public IEnumerable Invitations { get; set; } 12 | } 13 | 14 | public class ConnectionDetailsViewModel 15 | { 16 | public ConnectionRecord Connection { get; set; } 17 | 18 | public IEnumerable Messages { get; set; } 19 | 20 | public bool? TrustPingSuccess { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /samples/aspnetcore/Models/CredentialFormModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Hyperledger.Aries.Models.Records; 3 | using Hyperledger.Aries.Features.DidExchange; 4 | 5 | namespace WebAgent.Models 6 | { 7 | public class CredentialFormModel 8 | { 9 | public List CredentialDefinitions { get; set; } 10 | public List Schemas { get; set; } 11 | public List Connections { get; set; } 12 | 13 | public static string DefaultAttributes = 14 | @"[ 15 | { 'name': 'name', 'value': 'Alice Smith' }, 16 | { 'name': 'date', 'value': '2020-01-01' }, 17 | { 'name': 'degree', 'value': 'Maths' }, 18 | { 'name': 'age', 'value': '24' } 19 | ]"; 20 | } 21 | } -------------------------------------------------------------------------------- /samples/aspnetcore/Models/CredentialOfferModel.cs: -------------------------------------------------------------------------------- 1 | namespace WebAgent.Models 2 | { 3 | public class CredentialOfferModel 4 | { 5 | public string ConnectionId { get; set; } 6 | public string SchemaId { get; set; } 7 | public string CredentialDefinitionId { get; set; } 8 | public string CredentialAttributes { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /samples/aspnetcore/Models/CredentialViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Hyperledger.Aries.Features.IssueCredential; 4 | 5 | namespace WebAgent.Models 6 | { 7 | public class CredentialViewModel 8 | { 9 | public string SchemaId { get; set; } 10 | 11 | public DateTime CreatedAt { get; set; } 12 | 13 | public CredentialState State { get; set; } 14 | 15 | public IEnumerable CredentialAttributesValues { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /samples/aspnetcore/Models/CredentialsViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace WebAgent.Models 4 | { 5 | public class CredentialsViewModel 6 | { 7 | public IEnumerable Credentials { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /samples/aspnetcore/Models/ErrorViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace WebAgent.Models 2 | { 3 | public class ErrorViewModel 4 | { 5 | public string RequestId { get; set; } 6 | 7 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 8 | } 9 | } -------------------------------------------------------------------------------- /samples/aspnetcore/Models/LaunchAppViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | namespace WebAgent.Models 3 | { 4 | public class LaunchAppViewModel 5 | { 6 | public string UriSchema { get; set; } 7 | 8 | public string InvitationDetails { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /samples/aspnetcore/Program.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Microsoft.AspNetCore; 3 | using Microsoft.AspNetCore.Hosting; 4 | using Microsoft.Extensions.Hosting; 5 | 6 | namespace WebAgent 7 | { 8 | public class Program 9 | { 10 | public static Task Main(string[] args) => CreateHostBuilder(args).Build().RunAsync(); 11 | 12 | public static IHostBuilder CreateHostBuilder(string[] args) => 13 | Host.CreateDefaultBuilder(args) 14 | .ConfigureWebHostDefaults(webBuilder => webBuilder.UseStartup()); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /samples/aspnetcore/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "WebAgent": { 4 | "commandName": "Project", 5 | "launchBrowser": true, 6 | "environmentVariables": { 7 | "ASPNETCORE_ENVIRONMENT": "Development" 8 | }, 9 | "applicationUrl": "http://localhost:5000" 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /samples/aspnetcore/Protocols/BasicMessage/BasicMessage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using WebAgent.Messages; 3 | using Newtonsoft.Json; 4 | using Hyperledger.Aries.Agents; 5 | using System.Text.Json.Serialization; 6 | 7 | namespace WebAgent.Protocols.BasicMessage 8 | { 9 | public class BasicMessage : AgentMessage 10 | { 11 | public BasicMessage() 12 | { 13 | Id = Guid.NewGuid().ToString(); 14 | Type = CustomMessageTypes.BasicMessageType; 15 | } 16 | 17 | [JsonProperty("content")] 18 | public string Content { get; set; } 19 | 20 | [JsonProperty("sent_time")] 21 | [JsonPropertyName("sent_time")] 22 | public string SentTime { get; set; } 23 | } 24 | } -------------------------------------------------------------------------------- /samples/aspnetcore/Protocols/CustomMessageTypes.cs: -------------------------------------------------------------------------------- 1 | namespace WebAgent.Messages 2 | { 3 | public static class CustomMessageTypes 4 | { 5 | /// 6 | /// Basic Message Type. 7 | /// 8 | public const string BasicMessageType = "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/basicmessage/1.0/message"; 9 | 10 | /// 11 | /// Ping Message Type. 12 | /// 13 | public const string TrustPingMessageType = "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/trust_ping/1.0/ping"; 14 | 15 | /// 16 | /// Ping Response Message Type. 17 | /// 18 | public const string TrustPingResponseMessageType = "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/trust_ping/1.0/ping_response"; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /samples/aspnetcore/Protocols/TrustPing/TrustPingResponseMessage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Hyperledger.Aries.Agents; 3 | using Newtonsoft.Json; 4 | 5 | namespace WebAgent.Messages 6 | { 7 | /// 8 | /// A ping response message. 9 | /// 10 | public class TrustPingResponseMessage : AgentMessage 11 | { 12 | public TrustPingResponseMessage() 13 | { 14 | Id = Guid.NewGuid().ToString(); 15 | Type = CustomMessageTypes.TrustPingResponseMessageType; 16 | } 17 | 18 | /// 19 | /// Gets or sets the comment of the message. 20 | /// 21 | /// 22 | /// The comment. 23 | /// 24 | [JsonProperty("comment")] 25 | public string Comment { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /samples/aspnetcore/README.md: -------------------------------------------------------------------------------- 1 | # How to add Hyperledger Aries OpenApi 2 | 3 | ## Add the Hyperledger.Aries.AspNetCore Nuget 4 | 5 | ```console 6 | dotnet add package Hyperledger.Aries.AspNetCore 7 | ``` 8 | 9 | ## Update Startup ConfigureServices 10 | 11 | Aries OpenApi uses the FluentValidation nuget package to validate all requests sent to the endpoints. 12 | 13 | FluentValidation must be configured prior to calling AddAriesOpenApi. 14 | 15 | > Don't worry an exception will occur if you forget. 16 | 17 | Example: 18 | 19 | ```csharp 20 | services 21 | .AddMvc() 22 | .AddFluentValidation() 23 | .AddAriesOpenApi(a => a.UseSwaggerUi = true); 24 | ``` 25 | 26 | ## Update Startup Configure 27 | 28 | Configuring the pipeline to use the Aries Open Api is easily acomplished with a single exetension method. 29 | 30 | ```csharp 31 | app.UseAriesOpenApi(); 32 | ``` 33 | -------------------------------------------------------------------------------- /samples/aspnetcore/SimpleWebAgent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Hyperledger.Aries.Agents; 3 | using WebAgent.Messages; 4 | using WebAgent.Protocols.BasicMessage; 5 | 6 | namespace WebAgent 7 | { 8 | public class SimpleWebAgent : AgentBase 9 | { 10 | public SimpleWebAgent(IServiceProvider serviceProvider) 11 | : base(serviceProvider) 12 | { 13 | } 14 | 15 | protected override void ConfigureHandlers() 16 | { 17 | AddConnectionHandler(); 18 | AddForwardHandler(); 19 | AddHandler(); 20 | AddHandler(); 21 | AddDiscoveryHandler(); 22 | AddTrustPingHandler(); 23 | AddCredentialHandler(); 24 | AddProofHandler(); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /samples/aspnetcore/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model ProvisioningRecord 2 | 3 | @{ 4 | ViewData["Title"] = "Home"; 5 | } 6 |
7 |
8 | Agent Provisioning Configuration 9 |
10 |
11 | @Model.Owner.Name 12 |
@Model.Owner.Name
13 | @Model.Endpoint.Uri 14 |
15 |
    16 |
  • @Model.Endpoint.Did
  • 17 |
  • @Model.Endpoint.Verkey.First()
  • 18 |
19 |
-------------------------------------------------------------------------------- /samples/aspnetcore/Views/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 11 | 12 | -------------------------------------------------------------------------------- /samples/aspnetcore/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using WebAgent 2 | @using WebAgent.Models 3 | @using Hyperledger.Aries.Models.Records 4 | @using Hyperledger.Aries.Configuration 5 | @using Hyperledger.Aries.Features.DidExchange 6 | @using Jdenticon.AspNetCore 7 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 8 | @addTagHelper *, Jdenticon.AspNetCore -------------------------------------------------------------------------------- /samples/aspnetcore/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /samples/aspnetcore/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /samples/aspnetcore/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Information" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /samples/aspnetcore/bundleconfig.json: -------------------------------------------------------------------------------- 1 | // Configure bundling and minification for the project. 2 | // More info at https://go.microsoft.com/fwlink/?LinkId=808241 3 | [ 4 | { 5 | "outputFileName": "wwwroot/css/site.min.css", 6 | // An array of relative input file paths. Globbing patterns supported 7 | "inputFiles": [ 8 | "wwwroot/css/site.css" 9 | ] 10 | }, 11 | { 12 | "outputFileName": "wwwroot/js/site.min.js", 13 | "inputFiles": [ 14 | "wwwroot/js/site.js" 15 | ], 16 | // Optionally specify minification options 17 | "minify": { 18 | "enabled": true, 19 | "renameLocals": true 20 | }, 21 | // Optionally generate .map file 22 | "sourceMap": false 23 | } 24 | ] 25 | -------------------------------------------------------------------------------- /samples/aspnetcore/wwwroot/css/site.min.css: -------------------------------------------------------------------------------- 1 | body{padding-bottom:20px}.body-content{padding-left:15px;padding-right:15px}.carousel-caption p{font-size:20px;line-height:1.4}.carousel-inner .item img[src$=".svg"]{width:100%}#qrCode{margin:15px}@media screen and (max-width:767px){.carousel-caption{display:none}}.footer{position:fixed;bottom:0;width:100%;height:60px;line-height:60px;background-color:#f5f5f5}.basic-message{max-width:83%} -------------------------------------------------------------------------------- /samples/aspnetcore/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/aspnetcore/wwwroot/favicon.ico -------------------------------------------------------------------------------- /samples/aspnetcore/wwwroot/images/profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/aspnetcore/wwwroot/images/profile.png -------------------------------------------------------------------------------- /samples/aspnetcore/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Write your JavaScript code. 2 | function copyToCliboard(element) { 3 | /* Select the text field */ 4 | element.select(); 5 | 6 | /* Copy the text inside the text field */ 7 | document.execCommand("copy"); 8 | } 9 | 10 | $(function () { 11 | $('[data-toggle="tooltip"]').tooltip(); 12 | 13 | $('#invitation-details-form').submit(function(e){ 14 | var inputElement = $("#invitation-details"); 15 | if (inputElement.val() != "") 16 | { 17 | return true; 18 | } 19 | inputElement.addClass("is-invalid"); 20 | return false; 21 | }); 22 | }) -------------------------------------------------------------------------------- /samples/aspnetcore/wwwroot/js/site.min.js: -------------------------------------------------------------------------------- 1 | function copyToCliboard(n){n.select();document.execCommand("copy")}$(function(){$('[data-toggle="tooltip"]').tooltip();$("#invitation-details-form").submit(function(){var n=$("#invitation-details");return n.val()!=""?!0:(n.addClass("is-invalid"),!1)})}); -------------------------------------------------------------------------------- /samples/blazorHosted/Documentation/Contribute.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Hyperledger.Aries.AspNetCore:Contribute 3 | title: Hyperledger.Aries.AspNetCore Contribute 4 | --- -------------------------------------------------------------------------------- /samples/blazorHosted/Documentation/ReleaseNotes.md: -------------------------------------------------------------------------------- 1 | --- 2 | uid: Hyperledger.Aries.AspNetCore:ReleaseNotes 3 | title: Hyperledger.Aries.AspNetCore Release Notes 4 | --- -------------------------------------------------------------------------------- /samples/blazorHosted/Documentation/TestStructure.md: -------------------------------------------------------------------------------- 1 | # Testing Convention 2 | 3 | We are using Fixie which allows for a highly configurable convention. See `TestingConvention.cs` if you want to adjust it. 4 | 5 | 6 | ## Test naming conventions 7 | 8 | The `namespace` is the name of Class being tested 9 | The Class name is the Method/Action/Request being tested 10 | The Method name is the Result expected stating any conditions 11 | 12 | Example: 13 | 14 | Test Name: CounterState.IncrementCounterAction_Should.Decrement_Count_Given_NegativeAmount 15 | File Name: `CounterState_IncrementCounterAction_Tests.cs` 16 | 17 | * Namespace: CounterState 18 | * Class: IncrementCounterAction_Should 19 | * Method: Decrement_Count_Given_NegativeAmount 20 | 21 | The Filename uses the above `__Tests.cs` 22 | 23 | -------------------------------------------------------------------------------- /samples/blazorHosted/NuGet.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /samples/blazorHosted/Run.ps1: -------------------------------------------------------------------------------- 1 | $Env:ASPNETCORE_ENVIRONMENT = "Development" 2 | dotnet run --project .\Source\Server\ -------------------------------------------------------------------------------- /samples/blazorHosted/RunAlice.ps1: -------------------------------------------------------------------------------- 1 | dotnet run --project .\Source\Server\ --no-build --launch-profile "Hyperledger.Aries.AspNetCore.Server Alice" -------------------------------------------------------------------------------- /samples/blazorHosted/RunAliceAndFaber.ps1: -------------------------------------------------------------------------------- 1 | dotnet build 2 | Start-Process -FilePath 'dotnet' -ArgumentList 'run --project .\Source\Server\ --no-build --launch-profile "Hyperledger.Aries.AspNetCore.Server Alice"' 3 | Start-Process -FilePath 'dotnet' -ArgumentList 'run --project .\Source\Server\ --no-build --launch-profile "Hyperledger.Aries.AspNetCore.Server Faber"' 4 | -------------------------------------------------------------------------------- /samples/blazorHosted/RunFaber.ps1: -------------------------------------------------------------------------------- 1 | dotnet run --project .\Source\Server\ --no-build --launch-profile "Hyperledger.Aries.AspNetCore.Server Faber" -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/AssemblyAnnotations.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Client 2 | { 3 | public class AssemblyAnnotations 4 | { 5 | 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Components/App.razor: -------------------------------------------------------------------------------- 1 | @namespace Hyperledger.Aries.AspNetCore.Components 2 | @inherits BaseComponent 3 | 4 | 5 | 6 | 7 | 8 | 9 |

Page not found

10 |

Sorry, but there's nothing here!

11 |
12 |
13 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Components/BlazorLocation.razor: -------------------------------------------------------------------------------- 1 | @namespace Hyperledger.Aries.AspNetCore.Components 2 | @inherits BaseComponent 3 | 4 |
@LocationName
5 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Components/BlazorLocation.razor.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Components 2 | { 3 | using BlazorState.Services; 4 | using Microsoft.AspNetCore.Components; 5 | using Hyperledger.Aries.AspNetCore.Features.Bases; 6 | 7 | public partial class BlazorLocation: BaseComponent 8 | { 9 | [Inject] public BlazorHostingLocation BlazorHostingLocation { get; set; } 10 | 11 | public string LocationName => BlazorHostingLocation.IsClientSide ? "Client Side" : "Server Side"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Components/Identicon.razor: -------------------------------------------------------------------------------- 1 | @namespace Hyperledger.Aries.AspNetCore.Components 2 | @inherits ComponentBase 3 | 4 | @SvgMarkupString 5 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Components/Identicon.razor.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Components 2 | { 3 | using Jdenticon; 4 | using Microsoft.AspNetCore.Components; 5 | using System; 6 | using System.Threading.Tasks; 7 | 8 | public partial class Identicon : ComponentBase 9 | { 10 | [Parameter] public string Value { get; set; } 11 | [Parameter] public int Size { get; set; } 12 | private MarkupString SvgMarkupString { get; set; } 13 | 14 | private string CreateSvg() 15 | { 16 | var identicon = Jdenticon.Identicon.FromValue(Value, Size); 17 | return identicon.ToSvg(); 18 | } 19 | 20 | protected override Task OnParametersSetAsync() 21 | { 22 | SvgMarkupString = new MarkupString(CreateSvg()); 23 | return base.OnParametersSetAsync(); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Components/MainLayout.razor.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Components 2 | { 3 | using BlazorState.Services; 4 | using Microsoft.AspNetCore.Components; 5 | 6 | public partial class MainLayout : LayoutComponentBase 7 | { 8 | protected const string HeadingHeight = "52px"; 9 | [Inject] public BlazorHostingLocation BlazorHostingLocation { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Components/ResetButton.razor: -------------------------------------------------------------------------------- 1 | @namespace Hyperledger.Aries.AspNetCore.Components 2 | @inherits BaseComponent 3 | 4 |
5 | 6 |
7 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Components/ResetButton.razor.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Components 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | using static Hyperledger.Aries.AspNetCore.Features.Applications.ApplicationState; 5 | 6 | public partial class ResetButton:BaseComponent 7 | { 8 | internal void ButtonClick() => Mediator.Send(new ResetStoreAction()); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Components/TransformProperty.razor: -------------------------------------------------------------------------------- 1 | @namespace Hyperledger.Aries.AspNetCore.Components 2 | @typeparam TTransformed 3 | @typeparam TSource 4 | @ChildContent(this) 5 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Application/Actions/ResetStore/ResetStoreAction.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Applications 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | internal partial class ApplicationState 6 | { 7 | public class ResetStoreAction : BaseAction { } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Application/Actions/ToggleMenu/ToggleMenuAction.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Applications 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | internal partial class ApplicationState 6 | { 7 | public class ToggleMenuAction : BaseAction { } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Application/Actions/ToggleMenu/ToggleMenuHandler.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Applications 2 | { 3 | using BlazorState; 4 | using MediatR; 5 | using System.Threading; 6 | using System.Threading.Tasks; 7 | using Hyperledger.Aries.AspNetCore.Features.Bases; 8 | 9 | internal partial class ApplicationState 10 | { 11 | internal class ToggleMenuHandler : BaseHandler 12 | { 13 | public ToggleMenuHandler(IStore aStore) : base(aStore) { } 14 | 15 | public override Task Handle(ToggleMenuAction aResetStoreAction, CancellationToken aCancellationToken) 16 | { 17 | ApplicationState.IsMenuExpanded = !ApplicationState.IsMenuExpanded; 18 | return Unit.Task; 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Application/ApplicationState.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Applications 2 | { 3 | using BlazorState; 4 | 5 | internal partial class ApplicationState : State 6 | { 7 | public bool IsMenuExpanded { get; private set; } 8 | public string Logo { get; private set; } 9 | public string Name { get; private set; } 10 | public string Version => GetType().Assembly.GetName().Version.ToString(); 11 | 12 | public ApplicationState() { } 13 | 14 | public override void Initialize() 15 | { 16 | IsMenuExpanded = true; 17 | Name = "Hyperledger.Aries.AspNetCore"; 18 | Logo = "/images/logo.png"; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Application/Components/AccountMenu.razor.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Applications.Components 2 | { 3 | public partial class AccountMenu 4 | { 5 | protected bool Show { get; set; } 6 | 7 | protected string ShowCssClass => Show ? "show" : null; 8 | 9 | protected void ButtonClick() => Show = !Show; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Application/Components/Footer.razor: -------------------------------------------------------------------------------- 1 | @namespace Hyperledger.Aries.AspNetCore.Features.Applications.Components 2 | 3 | @using Hyperledger.Aries.AspNetCore.Components 4 | @using Hyperledger.Aries.AspNetCore.Features.Bases 5 | 6 | @inherits BaseComponent 7 | 8 | 12 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Application/Components/Footer.razor.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Applications.Components 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | public partial class Footer: BaseComponent 6 | { 7 | protected string Version => ApplicationState.Version; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Application/Components/NavBar.razor.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Applications.Components 2 | { 3 | using static Hyperledger.Aries.AspNetCore.Features.Applications.ApplicationState; 4 | 5 | public partial class NavBar 6 | { 7 | protected string NavMenuCssClass => ApplicationState.IsMenuExpanded ? null : "collapse"; 8 | 9 | protected async void ToggleNavMenu() => await Mediator.Send(new ToggleMenuAction()); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Application/Components/NavLinks.razor.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Applications.Components 2 | { 3 | public partial class NavLinks 4 | { 5 | public int IconSize { get; set; } = 16; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Application/Components/SideBar.razor: -------------------------------------------------------------------------------- 1 | @namespace Hyperledger.Aries.AspNetCore.Features.Applications.Components 2 | @using Hyperledger.Aries.AspNetCore.Features.Bases 3 | @inherits BaseComponent 4 | 5 | 10 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Application/Components/SideBar.razor.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Applications.Components 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | public partial class SideBar: BaseComponent 6 | { 7 | protected string NavMenuCssClass => ApplicationState.IsMenuExpanded ? null : "collapse"; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Base/BaseAction.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Bases 2 | { 3 | using BlazorState; 4 | 5 | public class BaseAction : BaseRequest, IAction { } 6 | } 7 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/ClientLoader/ClientLoaderConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.ClientLoaders 2 | { 3 | using System; 4 | 5 | public class ClientLoaderConfiguration : IClientLoaderConfiguration 6 | { 7 | public TimeSpan DelayTimeSpan => TimeSpan.FromSeconds(10); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/ClientLoader/IClientLoaderConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.ClientLoaders 2 | { 3 | using System; 4 | 5 | public interface IClientLoaderConfiguration 6 | { 7 | TimeSpan DelayTimeSpan { get; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Connection/Actions/AcceptInvitation/AcceptInvitationAction.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Connections 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | internal partial class ConnectionState 6 | { 7 | public class AcceptInvitationAction : BaseAction 8 | { 9 | public string InvitationDetails { get; set; } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Connection/Actions/ChangePage/ChangePageAction.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Connections 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | internal partial class ConnectionState 6 | { 7 | public class ChangePageAction : BaseAction 8 | { 9 | public int PageIndex { get; set; } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Connection/Actions/ChangePage/ChangePageHandler.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Connections 2 | { 3 | using BlazorState; 4 | using Hyperledger.Aries.AspNetCore.Features.Bases; 5 | using MediatR; 6 | using System.Threading; 7 | using System.Threading.Tasks; 8 | internal partial class ConnectionState 9 | { 10 | public class ChangePageHandler : BaseHandler 11 | { 12 | public ChangePageHandler(IStore aStore) : base(aStore) { } 13 | 14 | public override Task Handle(ChangePageAction aChangePageAction, CancellationToken aCancellationToken) 15 | { 16 | ConnectionState.PageIndex = aChangePageAction.PageIndex; 17 | return Unit.Task; 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Connection/Actions/Create/CreateConnectionAction.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Connections 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | internal partial class ConnectionState 6 | { 7 | public class CreateConnectionAction : BaseAction { } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Connection/Actions/Delete/DeleteConnectionAction.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Connections 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | internal partial class ConnectionState 6 | { 7 | public class DeleteConnectionAction : BaseAction 8 | { 9 | public string ConnectionId { get; set; } 10 | 11 | public DeleteConnectionAction(string aConnectionId) 12 | { 13 | ConnectionId = aConnectionId; 14 | } 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Connection/Actions/Fetch/FetchConnectionsAction.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Connections 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | internal partial class ConnectionState 6 | { 7 | public class FetchConnectionsAction : BaseAction { } 8 | } 9 | } -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Connection/Actions/FetchConnection/FetchConnectionAction.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Connections 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | internal partial class ConnectionState 6 | { 7 | 8 | public class FetchConnectionAction : BaseAction 9 | { 10 | public string ConnectionId { get; set; } 11 | 12 | public FetchConnectionAction(string aConnectionId) 13 | { 14 | ConnectionId = aConnectionId; 15 | } 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Connection/Actions/ViewInvitation/ViewInvitationAction.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Connections 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | internal partial class ConnectionState 6 | { 7 | public class ViewInvitationAction : BaseAction 8 | { 9 | public string InvitationDetails { get; set; } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Connection/Components/Details.razor: -------------------------------------------------------------------------------- 1 | @namespace Hyperledger.Aries.AspNetCore.Features.Connections.Components 2 | @inherits BaseComponent 3 | 4 | @if (Connection != null) 5 | { 6 |
7 | 8 |
9 |
Alias
10 |
@Connection?.Alias?.Name
11 |
Status
12 |
@Connection?.State
13 |
Id
14 |
@Connection?.Id
15 |
MyDid
16 |
@Connection?.MyDid
17 |
MyVk
18 |
@Connection?.MyVk
19 |
TheirDid
20 |
@Connection?.TheirDid
21 |
TheirVk
22 |
@Connection?.TheirVk
23 |
24 | } -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Connection/Pages/Create.razor: -------------------------------------------------------------------------------- 1 | @namespace Hyperledger.Aries.AspNetCore.Features.Connections.Pages 2 | @inherits BaseComponent 3 | @page "/connections/create" 4 | 5 |

Create Connection

6 | 7 |
8 | 9 |
10 |

Invitation Details

11 | 12 |
13 | @DisplayInvitationUrl 14 | 17 |
18 |
19 |
-------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Connection/Pages/Delete.razor: -------------------------------------------------------------------------------- 1 | @namespace Hyperledger.Aries.AspNetCore.Features.Connections.Pages 2 | @inherits BaseComponent 3 | @page "/connections/delete/{ConnectionId}" 4 | 5 |

Connection Delete Page

6 | 7 | 8 |

Are you sure you want to delete this item?

9 | 10 | 11 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Connection/Pages/Details.razor: -------------------------------------------------------------------------------- 1 | @namespace Hyperledger.Aries.AspNetCore.Features.Connections.Pages 2 | @inherits BaseComponent 3 | @page "/connections/details/{ConnectionId}" 4 | 5 |
6 |

Connection Item Details

7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Connection/Pages/Index.razor.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Connections.Pages 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | using static Hyperledger.Aries.AspNetCore.Features.Connections.ConnectionState; 5 | using System.Threading.Tasks; 6 | 7 | public partial class Index: BaseComponent 8 | { 9 | public const string RouteTemplate = "/connections"; 10 | 11 | public static string GetRoute() => RouteTemplate; 12 | 13 | protected override async Task OnInitializedAsync() 14 | { 15 | _ = await Mediator.Send(new FetchConnectionsAction()); 16 | await base.OnInitializedAsync(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Counter/Actions/IncrementCount/IncrementCounterAction.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Counters 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | internal partial class CounterState 6 | { 7 | public class IncrementCounterAction : BaseAction 8 | { 9 | public int Amount { get; set; } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Counter/Actions/IncrementCount/IncrementCounterHandler.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Counters 2 | { 3 | using BlazorState; 4 | using MediatR; 5 | using System.Threading; 6 | using System.Threading.Tasks; 7 | using Hyperledger.Aries.AspNetCore.Features.Bases; 8 | 9 | internal partial class CounterState 10 | { 11 | internal class IncrementCounterHandler : BaseHandler 12 | { 13 | public IncrementCounterHandler(IStore aStore) : base(aStore) { } 14 | 15 | public override Task Handle 16 | ( 17 | IncrementCounterAction aIncrementCounterAction, 18 | CancellationToken aCancellationToken 19 | ) 20 | { 21 | CounterState.Count += aIncrementCounterAction.Amount; 22 | return Unit.Task; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Counter/Actions/ThrowException/ThrowExceptionAction.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Counters 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | internal partial class CounterState 6 | { 7 | public class ThrowExceptionAction : BaseAction 8 | { 9 | public string Message { get; set; } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Counter/Actions/ThrowException/ThrowExceptionHandler.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Counters 2 | { 3 | using BlazorState; 4 | using MediatR; 5 | using System; 6 | using System.Threading; 7 | using System.Threading.Tasks; 8 | using Hyperledger.Aries.AspNetCore.Features.Bases; 9 | 10 | internal partial class CounterState 11 | { 12 | internal class ThrowExceptionHandler : BaseHandler 13 | { 14 | public ThrowExceptionHandler(IStore aStore) : base(aStore) { } 15 | 16 | public override Task Handle 17 | ( 18 | ThrowExceptionAction aThrowExceptionAction, 19 | CancellationToken aCancellationToken 20 | ) => 21 | // Intentionally throw so we can test exception handling. 22 | throw new Exception(aThrowExceptionAction.Message); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Counter/Components/Counter.razor: -------------------------------------------------------------------------------- 1 | @namespace Hyperledger.Aries.AspNetCore.Features.Counters.Components 2 | @using Hyperledger.Aries.AspNetCore.Features.Bases 3 | @inherits BaseComponent 4 | 5 |
6 |

Current count: @CounterState.Count

7 | 8 | 9 |
10 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Counter/Components/Counter.razor.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Counters.Components 2 | { 3 | using System.Threading.Tasks; 4 | using static Hyperledger.Aries.AspNetCore.Features.Counters.CounterState; 5 | 6 | public partial class Counter 7 | { 8 | protected async Task ButtonClick() => 9 | _ = await Mediator.Send(new IncrementCounterAction { Amount = 5 }); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Counter/CounterState.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Counters 2 | { 3 | using BlazorState; 4 | 5 | internal partial class CounterState : State 6 | { 7 | public int Count { get; private set; } 8 | 9 | public CounterState() { } 10 | 11 | /// 12 | /// Set the Initial State 13 | /// 14 | public override void Initialize() => Count = 3; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Counter/Pages/CounterPage.razor.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Pages 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | using BlazorState.Features.Routing; 5 | using System.Threading.Tasks; 6 | 7 | public partial class CounterPage : BaseComponent 8 | { 9 | public const string RouteTemplate = "/counter"; 10 | 11 | public static string GetRoute() => RouteTemplate; 12 | 13 | protected async Task ButtonClick() => 14 | _ = await Mediator.Send(new RouteState.ChangeRouteAction { NewRoute = "/" }); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Credential/Actions/Fetch/FetchCredentialsAction.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Credentials 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | internal partial class CredentialState 6 | { 7 | internal class FetchCredentialsAction : BaseAction { } 8 | } 9 | } -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Credential/Actions/OfferCredential/OfferCredentialAction.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Credentials 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | using Hyperledger.Aries.AspNetCore.Features.IssueCredentials; 5 | 6 | internal partial class CredentialState 7 | { 8 | public class OfferCredentialAction : BaseAction 9 | { 10 | public OfferCredentialRequest OfferCredentialRequest { get; set; } 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Credential/Actions/Save/SaveCredentialAction.cs: -------------------------------------------------------------------------------- 1 | //namespace Hyperledger.Aries.AspNetCore.Features.Credentials 2 | //{ 3 | // using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | // using Hyperledger.Aries.AspNetCore.Features.CredentialDefinitions; 5 | 6 | // internal partial class CredentialState 7 | // { 8 | // public class SaveCredentialAction : BaseAction 9 | // { 10 | // public CreateCredentialRequest CreateCredentialRequest { get; set; } 11 | // } 12 | // } 13 | //} 14 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Credential/Pages/Index.razor.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Credentials.Pages 2 | { 3 | using BlazorState.Features.Routing; 4 | using Hyperledger.Aries.AspNetCore.Features.Bases; 5 | using static Hyperledger.Aries.AspNetCore.Features.Credentials.CredentialState; 6 | using System.Threading.Tasks; 7 | 8 | public partial class Index : BaseComponent 9 | { 10 | public const string RouteTemplate = "/credentials"; 11 | 12 | public static string GetRoute() => RouteTemplate; 13 | 14 | 15 | protected async Task CreateClick() => 16 | _ = await Mediator.Send(new RouteState.ChangeRouteAction { NewRoute = Edit.GetRoute() }); 17 | 18 | protected override async Task OnInitializedAsync() 19 | { 20 | _ = await Mediator.Send(new FetchCredentialsAction()); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/CredentialDefinition/Actions/Create/CreateCredentialDefinitionAction.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.CredentialDefinitions 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | internal partial class CredentialDefinitionState 6 | { 7 | public class CreateCredentialDefinitionAction : BaseAction 8 | { 9 | public CreateCredentialDefinitionRequest CreateCredentialDefinitionRequest { get; set; } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/CredentialDefinition/Actions/Fetch/FetchCredentialDefinitionsAction.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.CredentialDefinitions 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | internal partial class CredentialDefinitionState 6 | { 7 | public class FetchCredentialDefinitionsAction : BaseAction { } 8 | } 9 | } -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/CredentialDefinition/Pages/Create.razor: -------------------------------------------------------------------------------- 1 | @namespace Hyperledger.Aries.AspNetCore.Features.CredentialDefinitions.Pages 2 | @inherits BaseComponent 3 | @page "/credential-definitions/create" 4 | 5 |
6 |
7 |

Create Credential Definition

8 | 9 |

Imagine a form here with all the bells and whistles. But until then you can just push the button.

10 | 11 |
-------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/PresentProof/Actions/AcceptProofRequest/AcceptProofRequestAction.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.PresentProofs 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | internal partial class PresentProofState 6 | { 7 | public class AcceptProofRequestAction : BaseAction 8 | { 9 | public string EncodedProofRequestMessage { get; set; } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/PresentProof/Actions/Create/CreateProofRequestAction.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.PresentProofs 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | internal partial class PresentProofState 6 | { 7 | public class CreateProofRequestAction : BaseAction 8 | { 9 | public CreateProofRequestRequest CreateProofRequestRequest { get; set; } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/PresentProof/Actions/Fetch/FetchProofsAction.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.PresentProofs 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | using Hyperledger.Aries.AspNetCore.Features.PresentProofs; 5 | 6 | internal partial class PresentProofState 7 | { 8 | public class FetchProofsAction : BaseAction { } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/PresentProof/Actions/ViewProofRequest/ViewProofRequestAction.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.PresentProofs 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | internal partial class PresentProofState 6 | { 7 | public class ViewProofRequestAction : BaseAction 8 | { 9 | public string EncodedProofRequestMessage { get; set; } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Schema/Actions/Create/CreateSchemaAction.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Schemas 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | internal partial class SchemaState 6 | { 7 | public class CreateSchemaAction : BaseAction { } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Schema/Actions/Fetch/FetchSchemasAction.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Schemas 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | internal partial class SchemaState 6 | { 7 | public class FetchSchemasAction : BaseAction { } 8 | } 9 | } -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Schema/Pages/Create.razor: -------------------------------------------------------------------------------- 1 | @namespace Hyperledger.Aries.AspNetCore.Features.Schemas.Pages 2 | @inherits BaseComponent 3 | @page "/schemas/create" 4 | 5 |
6 |

Create Schema

7 | 8 |

Imagine a form here with all the bells and whistles. But until then you can just push the button.

9 | 10 |
-------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Schema/Pages/Create.razor.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Schemas.Pages 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | using System.Threading.Tasks; 5 | using static Hyperledger.Aries.AspNetCore.Features.Schemas.SchemaState; 6 | using static BlazorState.Features.Routing.RouteState; 7 | 8 | public partial class Create : BaseComponent 9 | { 10 | public const string RouteTemplate = "/schemas/create"; 11 | public static string GetRoute() => RouteTemplate; 12 | 13 | protected async Task CreateClick() 14 | { 15 | _ = await Mediator.Send(new CreateSchemaAction()); 16 | _ = await Mediator.Send(new ChangeRouteAction { NewRoute = Pages.Index.RouteTemplate }); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Schema/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @namespace Hyperledger.Aries.AspNetCore.Features.Schemas.Pages 2 | @inherits BaseComponent 3 | @page "/schemas" 4 | 5 |
6 |
7 |

Schemas

8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | @foreach (var schema in SchemaState.SchemasAsList) 21 | { 22 | 23 | 24 | 25 | 26 | 29 | 30 | } 31 | 32 |
IdNameVersion
@schema.Id@schema.Name@schema.Version 27 | Details | Delete 28 |
33 |
34 | 35 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Schema/Pages/Index.razor.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Schemas.Pages 2 | { 3 | using BlazorState.Features.Routing; 4 | using System.Threading.Tasks; 5 | using static Hyperledger.Aries.AspNetCore.Features.Schemas.SchemaState; 6 | 7 | public partial class Index 8 | { 9 | public const string RouteTemplate = "/schemas"; 10 | 11 | public static string GetRoute() => RouteTemplate; 12 | 13 | 14 | protected async Task CreateClick() => 15 | _ = await Mediator.Send(new RouteState.ChangeRouteAction { NewRoute = Create.GetRoute() }); 16 | 17 | protected override Task OnInitializedAsync() 18 | { 19 | _ = Mediator.Send(new FetchSchemasAction()); 20 | return base.OnInitializedAsync(); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Schema/SchemaState.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Schemas 2 | { 3 | using BlazorState; 4 | using Hyperledger.Aries.Models.Records; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text.Json.Serialization; 8 | 9 | internal partial class SchemaState : State 10 | { 11 | private Dictionary _SchemaRecords; 12 | 13 | [JsonIgnore] 14 | public IReadOnlyDictionary Schemas => _SchemaRecords; 15 | 16 | public IReadOnlyList SchemasAsList => _SchemaRecords.Values.ToList(); 17 | 18 | public SchemaState() { } 19 | 20 | public override void Initialize() 21 | { 22 | _SchemaRecords = new Dictionary(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Wallet/Actions/Fetch/FetchWalletAction.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Wallets 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | internal partial class WalletState 6 | { 7 | public class FetchWalletAction : BaseAction { } 8 | } 9 | } -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Wallet/Actions/Reset/ResetWalletAction.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Wallets 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | internal partial class WalletState 6 | { 7 | public class ResetWalletAction : BaseAction { } 8 | } 9 | } -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Wallet/Pages/WalletPage.razor: -------------------------------------------------------------------------------- 1 | @namespace Hyperledger.Aries.AspNetCore.Features.Wallets.Pages 2 | @page "/wallet" 3 | @inherits BaseComponent 4 | 5 |
6 |

Wallet / Agent Provisioning Configuration

7 | 8 |
9 |
Uri
10 |
@Uri
11 |
Name
12 |
@Name
13 |
DID
14 |
@Did
15 |
VERKEY
16 |
@VerKey
17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Features/Wallet/WalletState.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Wallets 2 | { 3 | using BlazorState; 4 | using Hyperledger.Aries.Configuration; 5 | 6 | internal partial class WalletState : State 7 | { 8 | public bool IsCached { get; private set; } 9 | public ProvisioningRecord ProvisioningRecord { get; private set; } 10 | 11 | public WalletState() { } 12 | 13 | /// 14 | /// Set the Initial State 15 | /// 16 | public override void Initialize() 17 | { 18 | IsCached = false; 19 | ProvisioningRecord = null; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/InternalsVisibleToTest.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | [assembly: InternalsVisibleTo("Hyperledger.Aries.AspNetCore.Client.Integration.Tests")] 4 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Pages/Authentication/ChangePasswordPage.razor: -------------------------------------------------------------------------------- 1 | @namespace Hyperledger.Aries.AspNetCore.Pages 2 | 3 | @using Hyperledger.Aries.AspNetCore.Features.Bases 4 | 5 | @page "/changePassword" 6 | 7 | @inherits BaseComponent 8 | 9 |

Change Password Page

10 | 11 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Pages/Authentication/ChangePasswordPage.razor.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Pages 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | public partial class ChangePasswordPage : BaseComponent 6 | { 7 | public const string RouteTemplate = "/changePassword"; 8 | public static string GetRoute() => RouteTemplate; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Pages/Authentication/LoginPage.razor: -------------------------------------------------------------------------------- 1 | @namespace Hyperledger.Aries.AspNetCore.Pages 2 | 3 | @using Hyperledger.Aries.AspNetCore.Features.Bases 4 | 5 | @page "/login" 6 | 7 | @inherits BaseComponent 8 | 9 |

Login Page

10 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Pages/Authentication/LoginPage.razor.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Pages 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | public partial class LoginPage : BaseComponent 6 | { 7 | public const string RouteTemplate = "Login"; 8 | 9 | public static string GetRoute() => RouteTemplate; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Pages/Authentication/LogoutPage.razor: -------------------------------------------------------------------------------- 1 | @namespace Hyperledger.Aries.AspNetCore.Pages 2 | 3 | @using Hyperledger.Aries.AspNetCore.Features.Bases 4 | 5 | @page "/logout" 6 | 7 | @inherits BaseComponent 8 | 9 |

Logout Page

10 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Pages/Authentication/LogoutPage.razor.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Pages 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | public partial class LogoutPage : BaseComponent 6 | { 7 | public const string RouteTemplate = "Logout"; 8 | 9 | public static string GetRoute() => RouteTemplate; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Pages/Authentication/ProfilePage.razor: -------------------------------------------------------------------------------- 1 | @namespace Hyperledger.Aries.AspNetCore.Pages 2 | 3 | @using Hyperledger.Aries.AspNetCore.Features.Bases 4 | 5 | @page "/Profile" 6 | 7 | @inherits BaseComponent 8 | 9 |

Profile Page

10 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Pages/Authentication/ProfilePage.razor.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Pages 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | 5 | public partial class ProfilePage : BaseComponent 6 | { 7 | public const string RouteTemplate = "/Profile"; 8 | 9 | public static string GetRoute() => RouteTemplate; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @namespace Hyperledger.Aries.AspNetCore.Pages 2 | 3 | @using Hyperledger.Aries.AspNetCore.Features.Bases 4 | @using Hyperledger.Aries.AspNetCore.Components 5 | 6 | @page "/" 7 | 8 | @inherits BaseComponent 9 | 10 |
11 |

@ApplicationState.Name

12 | 13 |

14 | Aries Framework for .NET is a comprehensive implementation of the Aries protocols. 15 | It's purpose is to provide a universal library for building SSI application for the cloud, mobile and IoT stack 16 |

17 | 18 |

19 | This is a demo application which utilizes the Aries for for .NET OpenApi interface. 20 |

21 | 22 |
23 | Aries Framework for .NET GitHub project 24 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using Hyperledger.Aries.AspNetCore.Components 2 | @using Hyperledger.Aries.AspNetCore.Features.Bases 3 | @using Hyperledger.Aries.AspNetCore.Features.Connections.Components 4 | @using Hyperledger.Aries.AspNetCore.Pages 5 | @using Microsoft.AspNetCore.Components.Forms 6 | @using Microsoft.AspNetCore.Components.Routing 7 | @using Microsoft.AspNetCore.Components.Web 8 | @using PeterLeslieMorris.Blazor.Validation 9 | @using System.Net.Http.Json 10 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/wwwroot/InteropTest.js: -------------------------------------------------------------------------------- 1 | const dispatchIncrementCountAction = () => { 2 | console.log("%cdispatchIncrementCountAction", "color: green"); 3 | const IncrementCountActionName = "Hyperledger.Aries.AspNetCore.Features.Counters.CounterState+IncrementCounterAction, Hyperledger.Aries.AspNetCore.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"; 4 | const blazorState = window["BlazorState"]; 5 | blazorState.DispatchRequest(IncrementCountActionName, { amount: 7 }); 6 | }; 7 | 8 | function initialize() { 9 | console.log("Initialize InteropTest.js"); 10 | window["InteropTest"] = dispatchIncrementCountAction; 11 | } 12 | 13 | initialize(); -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/wwwroot/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/blazorHosted/Source/Client/wwwroot/android-chrome-192x192.png -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/wwwroot/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/blazorHosted/Source/Client/wwwroot/android-chrome-512x512.png -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/wwwroot/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/blazorHosted/Source/Client/wwwroot/apple-touch-icon.png -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/blazorHosted/Source/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/blazorHosted/Source/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/blazorHosted/Source/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/blazorHosted/Source/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | @import url('open-iconic/font/css/open-iconic-bootstrap.min.css'); 2 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/wwwroot/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/blazorHosted/Source/Client/wwwroot/favicon-16x16.png -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/wwwroot/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/blazorHosted/Source/Client/wwwroot/favicon-32x32.png -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/blazorHosted/Source/Client/wwwroot/favicon.ico -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/wwwroot/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/blazorHosted/Source/Client/wwwroot/images/favicon.png -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/wwwroot/images/hyperledger_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/blazorHosted/Source/Client/wwwroot/images/hyperledger_logo.png -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/wwwroot/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/blazorHosted/Source/Client/wwwroot/images/logo.png -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Client/wwwroot/site.webmanifest: -------------------------------------------------------------------------------- 1 | {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hyperledger.Aries.AspNetCore 5 | 6 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Server/AriesWebAgent.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore 2 | { 3 | using Hyperledger.Aries.Agents; 4 | using System; 5 | public class AriesWebAgent : AgentBase 6 | { 7 | public AriesWebAgent(IServiceProvider aServiceProvider) : base(aServiceProvider) { } 8 | 9 | protected override void ConfigureHandlers() 10 | { 11 | AddConnectionHandler(); 12 | AddForwardHandler(); 13 | //AddHandler(); 14 | //AddHandler(); 15 | //AddDiscoveryHandler(); 16 | //AddTrustPingHandler(); 17 | AddCredentialHandler(); 18 | AddProofHandler(); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Server/Configuration/AgentSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Configuration 2 | { 3 | public class AgentSettings 4 | { 5 | public string AgentName { get; set; } 6 | public string EndpointUri { get; set; } 7 | public string GenesisFilename { get; set; } 8 | public string IssuerKeySeed { get; set; } 9 | public string PoolName { get; set; } 10 | public string WalletId { get; set; } 11 | public string WalletKey { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Server/GlobalSuppressions.cs: -------------------------------------------------------------------------------- 1 | // This file is used by Code Analysis to maintain SuppressMessage 2 | // attributes that are applied to this project. 3 | // Project-level suppressions either have no target or are given 4 | // a specific target and scoped to a namespace, type, member, etc. 5 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Server/Infrastructure/MappingProfile.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Infrastructure 2 | { 3 | using AutoMapper; 4 | using Hyperledger.Aries.AspNetCore.Features.Connections; 5 | using Hyperledger.Aries.Features.DidExchange; 6 | 7 | public class MappingProfile : Profile 8 | { 9 | public MappingProfile() 10 | { 11 | //CreateMap(); 12 | CreateMap(); 13 | } 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Server/InternalsVisibleToTest.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | [assembly: InternalsVisibleTo("Hyperledger.Aries.AspNetCore.Server.Integration.Tests")] 4 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Server/Program.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Server 2 | { 3 | using Microsoft.AspNetCore.Hosting; 4 | 5 | 6 | using Microsoft.Extensions.Hosting; 7 | 8 | public class Program 9 | { 10 | public static IHostBuilder CreateHostBuilder(string[] aArgumentArray) => 11 | Host.CreateDefaultBuilder(aArgumentArray) 12 | .ConfigureWebHostDefaults 13 | ( 14 | aWebHostBuilder => 15 | { 16 | aWebHostBuilder.UseStaticWebAssets(); 17 | aWebHostBuilder.UseStartup(); 18 | } 19 | ); 20 | 21 | public static void Main(string[] aArgumentArray) => CreateHostBuilder(aArgumentArray).Build().StartAsync(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Server/appsettings.Alice.json: -------------------------------------------------------------------------------- 1 | { 2 | "AgentSettings": { 3 | "AgentName": "Alice", 4 | "WalletId": "7B10483F-59E6-4DC3-AA7A-529C48462FDB", 5 | "WalletKey": "AliceWalletKey", 6 | "EndpointUri": "https://localhost:5553" 7 | }, 8 | "Logging": { 9 | "LogLevel": { 10 | "Default": "Debug", 11 | "System": "Information", 12 | "Microsoft": "Information" 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "AgentSettings": { 3 | "AgentName": "Faber", 4 | "EndpointUri": "https://localhost:5551", 5 | "WalletId": "AC1FD5F5-2056-4155-A071-CF1A13D40A2A", 6 | "WalletKey": "FaberWalletKey" 7 | }, 8 | "Logging": { 9 | "LogLevel": { 10 | "Default": "Debug", 11 | "System": "Information", 12 | "Microsoft": "Information" 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /samples/blazorHosted/Source/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "AgentSettings": { 3 | "IssuerKeySeed": "000000000000000000000000Steward1", 4 | "GenesisFilename": "pool_genesis.txn", 5 | "PoolName": "TestPool" 6 | }, 7 | "Logging": { 8 | "LogLevel": { 9 | "Default": "Information", 10 | "Microsoft": "Warning", 11 | "Microsoft.Hosting.Lifetime": "Information" 12 | } 13 | }, 14 | "AllowedHosts": "*" 15 | } 16 | -------------------------------------------------------------------------------- /samples/blazorHosted/StartIndyPool.ps1: -------------------------------------------------------------------------------- 1 | Push-Location ..\..\docker 2 | docker build -f indy-pool.dockerfile -t indy_pool . 3 | docker run -itd -p 9701-9709:9701-9709 indy_pool 4 | Pop-Location -------------------------------------------------------------------------------- /samples/blazorHosted/TestCafe.ps1: -------------------------------------------------------------------------------- 1 | Push-Location ./Tests/EndToEnd.TestCafe.Tests 2 | npm test 3 | Pop-Location -------------------------------------------------------------------------------- /samples/blazorHosted/Tests/Client.Integration.Tests/Infrastructure/ClientHost.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Client.Integration.Tests.Infrastructure 2 | { 3 | using Microsoft.Extensions.DependencyInjection; 4 | using System; 5 | 6 | [NotTest] 7 | public class ClientHost 8 | { 9 | 10 | public ClientHost(ServiceProvider aServiceProvider) 11 | { 12 | ServiceProvider = aServiceProvider; 13 | } 14 | 15 | public IServiceProvider ServiceProvider { get; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /samples/blazorHosted/Tests/Client.Integration.Tests/Infrastructure/ClientLoaderTestConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Client.Integration.Tests.Infrastructure 2 | { 3 | using System; 4 | using Hyperledger.Aries.AspNetCore.Features.ClientLoaders; 5 | 6 | [NotTest] 7 | public class ClientLoaderTestConfiguration : IClientLoaderConfiguration 8 | { 9 | public TimeSpan DelayTimeSpan => TimeSpan.FromMilliseconds(10); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /samples/blazorHosted/Tests/Client.Integration.Tests/Serialization/Person.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.JsonSerializer.Tests 2 | { 3 | using System; 4 | internal class Person 5 | { 6 | public DateTime? BirthDay { get; set; } 7 | public string FirstName { get; set; } 8 | public string LastName { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /samples/blazorHosted/Tests/EndToEnd.TestCafe.Tests/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /samples/blazorHosted/Tests/EndToEnd.TestCafe.Tests/Hyperledger.Aries.AspNetCore.EndToEnd.TestCafe.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | $(TestProjectTargetFramework) 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /samples/blazorHosted/Tests/EndToEnd.TestCafe.Tests/README.md: -------------------------------------------------------------------------------- 1 | # TestApp.EndToEnd.TestCafe.Tests 2 | 3 | End to End tests using TestCafe 4 | 5 | ## Install 6 | 7 | Run `npm install` from the test project directory, the same directory this README.md is in. 8 | 9 | ## Execute 10 | 11 | Run `npm test` from the test project directory, same directory this README.md is in. 12 | 13 | Or run `testcafe.ps1` from the sln directory. -------------------------------------------------------------------------------- /samples/blazorHosted/Tests/EndToEnd.TestCafe.Tests/WeatherForecastPage.ts: -------------------------------------------------------------------------------- 1 | import { Selector } from "testcafe"; 2 | 3 | fixture`WeatherForecastsPage`.page`https://localhost:5011/weatherforecasts`; 4 | 5 | test("Should have data", async t => { 6 | const weatherForecastTableRows = Selector('[data-qa="WeatherForecastTable"] tr') 7 | .with({visibilityCheck: true}); 8 | 9 | const minimumNumberOfRowsExpected = 5; 10 | await t.expect(weatherForecastTableRows.count).gt(minimumNumberOfRowsExpected); 11 | }); 12 | -------------------------------------------------------------------------------- /samples/blazorHosted/Tests/EndToEnd.TestCafe.Tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test-app.end-to-end.test-cafe.tests", 3 | "scripts": { 4 | "server": "dotnet run --no-build --project ../../Source/Server/Hyperledger.Aries.AspNetCore.Server.csproj --urls https://localhost:5011", 5 | "test": "testcafe edge tests/ --app \"npm run server > NUL\" --app-init-delay 5000" 6 | }, 7 | "devDependencies": { 8 | "testcafe": "^1.4.1" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /samples/blazorHosted/Tests/EndToEnd.TestCafe.Tests/tests/ChangeRouteShould.ts: -------------------------------------------------------------------------------- 1 | import { ClientFunction, Selector } from 'testcafe'; 2 | 3 | fixture `CounterPage` 4 | .page `https://localhost:5011/`; 5 | 6 | test('Change Route Should Change Route', async t => { 7 | await t 8 | .click(Selector('a').withText('Counter')); 9 | 10 | const changeRouteButton = Selector('[data-qa="ChangeRoute"]'); 11 | const homeHeader = Selector('[data-qa="HomeHeader"]'); 12 | 13 | await t 14 | .click(changeRouteButton) 15 | .expect(homeHeader.exists).ok(); 16 | 17 | }); 18 | -------------------------------------------------------------------------------- /samples/blazorHosted/Tests/EndToEnd.TestCafe.Tests/tests/WeatherForecastPage.ts: -------------------------------------------------------------------------------- 1 | import { Selector } from "testcafe"; 2 | 3 | fixture`WeatherForecastsPage`.page`https://localhost:5011/weatherforecasts`; 4 | 5 | test("Should have data", async t => { 6 | const weatherForecastTableRows = Selector('[data-qa="WeatherForecastTable"] tr') 7 | .with({visibilityCheck: true}); 8 | 9 | const minimumNumberOfRowsExpected = 5; 10 | await t.expect(weatherForecastTableRows.count).gt(minimumNumberOfRowsExpected); 11 | }); 12 | -------------------------------------------------------------------------------- /samples/blazorHosted/Tests/EndToEnd.TestCafe.Tests/util/LocalStorage.ts: -------------------------------------------------------------------------------- 1 | import { ClientFunction } from "testcafe"; 2 | export const getLocalStorage = ClientFunction((key: string) => { 3 | return new Promise(resolve => { 4 | const result = localStorage.getItem(key); 5 | resolve(result); 6 | }); 7 | }); 8 | 9 | export const setLocalStorage = ClientFunction((key: string, value: string) => { 10 | return new Promise((resolve, reject) => { 11 | try { 12 | localStorage.setItem(key, value); 13 | resolve(); 14 | } catch (error) { 15 | reject(error); 16 | } 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /samples/blazorHosted/Tests/Hyperledger.Aries.AspNetCore.Tests/Features/Connection/DeleteConnection/DeleteConnection_BaseTest.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Server.Integration.Tests.Infrastructure 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Connections; 4 | using FluentAssertions; 5 | public partial class BaseTest 6 | { 7 | internal static void ValidateDeleteConnectionResponse 8 | ( 9 | DeleteConnectionRequest aDeleteConnectionRequest, 10 | DeleteConnectionResponse aDeleteConnectionResponse 11 | ) 12 | { 13 | aDeleteConnectionResponse.CorrelationId.Should().Be(aDeleteConnectionRequest.CorrelationId); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /samples/blazorHosted/Tests/Hyperledger.Aries.AspNetCore.Tests/Features/Credential/GetCredentials/GetCredentials_BaseTest.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Server.Integration.Tests.Infrastructure 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Credentials; 4 | using FluentAssertions; 5 | 6 | public partial class BaseTest 7 | { 8 | internal static void ValidateGetCredentialsResponse 9 | ( 10 | GetCredentialsRequest aGetCredentialsRequest, 11 | GetCredentialsResponse aGetCredentialsResponse 12 | ) 13 | { 14 | aGetCredentialsResponse.CorrelationId.Should().Be(aGetCredentialsRequest.CorrelationId); 15 | aGetCredentialsResponse.CredentialRecords.Should().NotBeNull(); 16 | aGetCredentialsResponse.CredentialRecords.Count.Should().Be(1); 17 | } 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /samples/blazorHosted/Tests/Hyperledger.Aries.AspNetCore.Tests/Features/Wallet/ResetWallet/ResetWallet_BaseTest.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Server.Integration.Tests.Infrastructure 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Wallets; 4 | using FluentAssertions; 5 | using System.Threading.Tasks; 6 | 7 | public partial class BaseTest 8 | { 9 | internal static void ValidateResetWalletResponse(ResetWalletRequest aResetWalletRequest, ResetWalletResponse aResetWalletResponse) 10 | { 11 | aResetWalletResponse.CorrelationId.Should().Be(aResetWalletRequest.CorrelationId); 12 | } 13 | 14 | internal Task ResetAgent() => Send(new ResetWalletRequest()); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /samples/blazorHosted/Tests/Hyperledger.Aries.AspNetCore.Tests/Infrastructure/Servers/AliceServer.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Server.Integration.Tests.Infrastructure.Servers 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | public class AliceServer 9 | { 10 | 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /samples/blazorHosted/Tests/Hyperledger.Aries.AspNetCore.Tests/Infrastructure/Servers/FaberServer.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Server.Integration.Tests.Infrastructure.Servers 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | public class FaberServer 9 | { 10 | 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /samples/blazorHosted/Tests/Hyperledger.Aries.AspNetCore.Tests/Infrastructure/WebApplicationFactories/AliceWebApplicationFactory.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Server.Integration.Tests.Infrastructure 2 | { 3 | using Microsoft.AspNetCore.Hosting; 4 | using Microsoft.AspNetCore.Mvc.Testing; 5 | 6 | [NotTest] 7 | public class AliceWebApplicationFactory : WebApplicationFactory 8 | { 9 | protected override void ConfigureWebHost(IWebHostBuilder aWebHostBuilder) 10 | { 11 | aWebHostBuilder.UseEnvironment("Alice"); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /samples/blazorHosted/Tests/Hyperledger.Aries.AspNetCore.Tests/Infrastructure/WebApplicationFactories/FaberWebApplicationFactory.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Server.Integration.Tests.Infrastructure 2 | { 3 | using Microsoft.AspNetCore.Hosting; 4 | using Microsoft.AspNetCore.Mvc.Testing; 5 | 6 | [NotTest] 7 | public class FaberWebApplicationFactory : WebApplicationFactory 8 | { 9 | protected override void ConfigureWebHost(IWebHostBuilder aWebHostBuilder) 10 | { 11 | aWebHostBuilder.UseEnvironment("Development"); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /samples/blazorHosted/global.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdk": { 3 | "version": "3.1.301", 4 | "rollForward": "disable" 5 | } 6 | } -------------------------------------------------------------------------------- /samples/routing/EdgeConsoleClient/Edge.Console.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | false 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /samples/routing/MediatorAgentService/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Hosting; 6 | using Microsoft.Extensions.Configuration; 7 | using Microsoft.Extensions.Hosting; 8 | using Microsoft.Extensions.Logging; 9 | 10 | namespace MediatorAgentService 11 | { 12 | public class Program 13 | { 14 | public static void Main(string[] args) 15 | { 16 | CreateHostBuilder(args).Build().Run(); 17 | } 18 | 19 | public static IHostBuilder CreateHostBuilder(string[] args) => 20 | Host.CreateDefaultBuilder(args) 21 | .ConfigureWebHostDefaults(webBuilder => 22 | { 23 | webBuilder.UseStartup(); 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /samples/routing/MediatorAgentService/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:41670", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "Mediator.Web": { 12 | "commandName": "Project", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | }, 17 | "applicationUrl": "https://localhost:5001;http://localhost:5000" 18 | }, 19 | "MediatorAgentService": { 20 | "commandName": "Project", 21 | "launchBrowser": true, 22 | "environmentVariables": { 23 | "ASPNETCORE_ENVIRONMENT": "Development" 24 | }, 25 | "applicationUrl": "http://localhost:5000" 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /samples/routing/MediatorAgentService/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /samples/routing/MediatorAgentService/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.Android/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with you package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); 20 | -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.Android/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.Android/Resources/layout/Tabbar.axml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.Android/Resources/layout/Toolbar.axml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.Android/Resources/mipmap-anydpi-v26/icon.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.Android/Resources/mipmap-anydpi-v26/icon_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.Android/Resources/mipmap-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.Android/Resources/mipmap-hdpi/icon.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.Android/Resources/mipmap-hdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.Android/Resources/mipmap-hdpi/launcher_foreground.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.Android/Resources/mipmap-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.Android/Resources/mipmap-mdpi/icon.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.Android/Resources/mipmap-mdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.Android/Resources/mipmap-mdpi/launcher_foreground.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.Android/Resources/mipmap-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.Android/Resources/mipmap-xhdpi/icon.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.Android/Resources/mipmap-xhdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.Android/Resources/mipmap-xhdpi/launcher_foreground.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.Android/Resources/mipmap-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.Android/Resources/mipmap-xxhdpi/icon.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.Android/Resources/mipmap-xxhdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.Android/Resources/mipmap-xxhdpi/launcher_foreground.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.Android/Resources/mipmap-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.Android/Resources/mipmap-xxxhdpi/icon.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.Android/Resources/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | #3F51B5 5 | #303F9F 6 | #FF4081 7 | -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.iOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.iOS/Main.cs: -------------------------------------------------------------------------------- 1 | using UIKit; 2 | 3 | namespace AFMobileSample.iOS 4 | { 5 | public class Application 6 | { 7 | // This is the main entry point of the application. 8 | static void Main(string[] args) 9 | { 10 | // if you want to use a different Application Delegate class from "AppDelegate" 11 | // you can specify it here. 12 | UIApplication.Main(args, null, "AppDelegate"); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.iOS/Resources/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.iOS/Resources/Default-568h@2x.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.iOS/Resources/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.iOS/Resources/Default-Portrait.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.iOS/Resources/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.iOS/Resources/Default-Portrait@2x.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.iOS/Resources/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.iOS/Resources/Default.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample.iOS/Resources/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/samples/xamarin-forms/AFMobileSample.iOS/Resources/Default@2x.png -------------------------------------------------------------------------------- /samples/xamarin-forms/AFMobileSample/App.xaml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /samples/xamarin-forms/libs-android/README: -------------------------------------------------------------------------------- 1 | You will need to fill in this directory with the contents of this directory: 2 | https://github.com/mattrglobal/osma/tree/be9d8271ba91a9385bca2593b84e344fa16c325a/src/Osma.Mobile.App.Android/libs 3 | -------------------------------------------------------------------------------- /samples/xamarin-forms/libs-ios/README: -------------------------------------------------------------------------------- 1 | You will need to fill in this directory with the contents of this directory: 2 | https://github.com/mattrglobal/osma/tree/be9d8271ba91a9385bca2593b84e344fa16c325a/src/Osma.Mobile.App.iOS/libs 3 | -------------------------------------------------------------------------------- /scripts/start-node-pool.sh: -------------------------------------------------------------------------------- 1 | docker container rm indy_pool 2 | docker build -f ../docker/indy-pool.dockerfile -t indy_pool . 3 | docker run --name indy_pool -itd -p 9701-9709:9701-9709 indy_pool -------------------------------------------------------------------------------- /scripts/start-web-agents.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo 'Starting NGROK' 4 | ngrok start -config web-agents-ngrok-config.yaml --all > /dev/null & 5 | sleep 2s 6 | ngrok_hosts=$(curl --silent --show-error http://localhost:5037/api/tunnels | sed -nE 's/.*public_url":"http:..([^"]*).*public_url":"http:..([^"]*).*/\1|\2/p') 7 | IFS="|" read -r host2 host1 <<< "$ngrok_hosts" 8 | 9 | export HOST1="http://$host1" 10 | export HOST2="http://$host2" 11 | 12 | echo "NGROK started" 13 | 14 | echo "Starting Web Agents with public urls $HOST1 $HOST2" 15 | docker-compose -f ../docker-compose.yaml build 16 | docker-compose -f ../docker-compose.yaml up -------------------------------------------------------------------------------- /scripts/stop-node-pool.sh: -------------------------------------------------------------------------------- 1 | docker stop indy_pool -------------------------------------------------------------------------------- /scripts/tester.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Will run any tests that have the Keyword in their name. 4 | # Example: DisplayName~Aries will run all Tests 5 | # Example: DisplayName~ProofTests will only run ProofTests 6 | 7 | (cd test/Hyperledger.Aries.Tests && \ 8 | dotnet test --nologo --filter DisplayName~Aries --verbosity normal) -------------------------------------------------------------------------------- /scripts/web-agents-ngrok-config.yaml: -------------------------------------------------------------------------------- 1 | web_addr: 5037 2 | tunnels: 3 | web-agent-1: 4 | addr: 7000 5 | proto: http 6 | host_header: "localhost:7000" 7 | bind-tls: false 8 | web-agent-2: 9 | addr: 8000 10 | proto: http 11 | host_header: "localhost:8000" 12 | bind-tls: false -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/AssemblyAnnotations.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Api 2 | { 3 | public class AssemblyAnnotations 4 | { 5 | 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Base/BaseApiRequest.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Bases 2 | { 3 | public abstract class BaseApiRequest : BaseRequest 4 | { 5 | internal abstract string GetRoute(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Base/BaseRequest.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Bases 2 | { 3 | using System; 4 | 5 | public abstract class BaseRequest 6 | { 7 | public const string BaseUri = "aries/"; 8 | 9 | /// 10 | /// Unique Identifier 11 | /// 12 | public Guid CorrelationId { get; set; } 13 | 14 | public BaseRequest() 15 | { 16 | CorrelationId = Guid.NewGuid(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Base/BaseResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Bases 2 | { 3 | using System; 4 | 5 | public abstract class BaseResponse 6 | { 7 | /// 8 | /// Used to correlate request and response 9 | /// 10 | public Guid CorrelationId { get; set; } 11 | 12 | public BaseResponse(Guid correlationId) : base() 13 | { 14 | CorrelationId = correlationId; 15 | } 16 | 17 | public BaseResponse() 18 | { 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/BasicMessaging/FeatureAnnotations.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.BasicMessaging 2 | { 3 | public static class FeatureAnnotations 4 | { 5 | public const string FeatureGroup = "Basic Messaging"; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/BasicMessaging/SendMessage/SendMessageRequestValidator.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.BasicMessaging 2 | { 3 | using FluentValidation; 4 | 5 | public class SendMessageRequestValidator : AbstractValidator 6 | { 7 | public SendMessageRequestValidator() 8 | { 9 | RuleFor(aSendMessageRequest => aSendMessageRequest.ConnectionId) 10 | .NotEmpty(); 11 | 12 | RuleFor(aSendMessageRequest => aSendMessageRequest.Message) 13 | .NotEmpty(); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/BasicMessaging/SendMessage/SendMessageResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.BasicMessaging 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | using System; 5 | 6 | public class SendMessageResponse : BaseResponse 7 | { 8 | public SendMessageResponse() { } 9 | 10 | public SendMessageResponse(Guid aCorrelationId) : base(aCorrelationId) { } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Connection/AcceptInvitation/AcceptInvitationRequest.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Connections 2 | { 3 | using MediatR; 4 | using Hyperledger.Aries.AspNetCore.Features.Bases; 5 | 6 | public class AcceptInvitationRequest : BaseApiRequest, IRequest 7 | { 8 | public const string RouteTemplate = BaseRequest.BaseUri + "connections/accept-invitation"; 9 | 10 | public string InvitationDetails { get; set; } = null!; 11 | 12 | internal override string GetRoute() => $"{RouteTemplate}?{nameof(CorrelationId)}={CorrelationId}"; 13 | } 14 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Connection/AcceptInvitation/AcceptInvitationRequestValidator.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Connections 2 | { 3 | using FluentValidation; 4 | 5 | public class AcceptInvitationRequestValidator : AbstractValidator 6 | { 7 | 8 | public AcceptInvitationRequestValidator() 9 | { 10 | RuleFor(aAcceptInvitationRequest => aAcceptInvitationRequest.InvitationDetails) 11 | .NotEmpty(); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Connection/AcceptInvitation/AcceptInvitationResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Connections 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using Hyperledger.Aries.AspNetCore.Features.Bases; 6 | 7 | public class AcceptInvitationResponse : BaseResponse 8 | { 9 | public AcceptInvitationResponse() { } 10 | 11 | public AcceptInvitationResponse(Guid aCorrelationId) : base(aCorrelationId) { } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Connection/DeleteConnection/DeleteConnectionRequestValidator.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Connections 2 | { 3 | using FluentValidation; 4 | 5 | public class DeleteConnectionRequestValidator : AbstractValidator 6 | { 7 | public DeleteConnectionRequestValidator() 8 | { 9 | RuleFor(aDeleteConnectionRequest => aDeleteConnectionRequest.ConnectionId) 10 | .NotEmpty(); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Connection/DeleteConnection/DeleteConnectionResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Connections 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | using System; 5 | 6 | public class DeleteConnectionResponse : BaseResponse 7 | { 8 | public DeleteConnectionResponse() { } 9 | 10 | public DeleteConnectionResponse(Guid aCorrelationId) : base(aCorrelationId) { } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Connection/FeatureAnnotations.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Connections 2 | { 3 | public static class FeatureAnnotations 4 | { 5 | public const string FeatureGroup = "Connection"; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Connection/GetConnection/GetConnectionRequestValidator.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Connections 2 | { 3 | using FluentValidation; 4 | 5 | public class GetConnectionRequestValidator : AbstractValidator 6 | { 7 | public GetConnectionRequestValidator() 8 | { 9 | RuleFor(aGetConnectionRequest => aGetConnectionRequest.ConnectionId) 10 | .NotEmpty(); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Connection/GetConnection/GetConnectionResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Connections 2 | { 3 | using Aries.Features.Handshakes.Common; 4 | using Bases; 5 | using System; 6 | 7 | public class GetConnectionResponse : BaseResponse 8 | { 9 | public ConnectionRecord? ConnectionRecord { get; set; } 10 | 11 | public GetConnectionResponse() { } 12 | 13 | public GetConnectionResponse(Guid aCorrelationId, ConnectionRecord aConnectionRecord) : base(aCorrelationId) 14 | { 15 | ConnectionRecord = aConnectionRecord; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Connection/GetConnections/GetConnectionsRequest.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Connections 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | using MediatR; 5 | 6 | public class GetConnectionsRequest : BaseApiRequest, IRequest 7 | { 8 | public const string RouteTemplate = BaseRequest.BaseUri + "connections"; 9 | 10 | internal override string GetRoute() => $"{RouteTemplate}?{nameof(CorrelationId)}={CorrelationId}"; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Connection/GetConnections/GetConnectionsRequestValidator.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Connections 2 | { 3 | using FluentValidation; 4 | 5 | public class GetConnectionsRequestValidator : AbstractValidator 6 | { 7 | public GetConnectionsRequestValidator() { } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Connection/GetConnections/GetConnectionsResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Connections 2 | { 3 | using Aries.Features.Handshakes.Common; 4 | using Bases; 5 | using System; 6 | using System.Collections.Generic; 7 | 8 | public class GetConnectionsResponse : BaseResponse 9 | { 10 | public List ConnectionRecords { get; set; } = null!; 11 | 12 | public GetConnectionsResponse() { } 13 | 14 | public GetConnectionsResponse(Guid aCorrelationId, List aConnectionRecords) 15 | : base(aCorrelationId) 16 | { 17 | ConnectionRecords = aConnectionRecords; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Connection/ReceiveInvitation/ReceiveInvitationRequest.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Connections 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | using MediatR; 5 | 6 | public class ReceiveInvitationRequest : BaseApiRequest, IRequest 7 | { 8 | public const string RouteTemplate = BaseRequest.BaseUri + "connections/receive-invitation"; 9 | 10 | public string InvitationDetails { get; set; } = null!; 11 | 12 | internal override string GetRoute() => $"{RouteTemplate}?{nameof(CorrelationId)}={CorrelationId}"; 13 | 14 | public ReceiveInvitationRequest(string aInvitationDetails) 15 | { 16 | InvitationDetails = aInvitationDetails; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Connection/ReceiveInvitation/ReceiveInvitationRequestValidator.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Connections 2 | { 3 | using FluentValidation; 4 | 5 | public class ReceiveInvitationRequestValidator : AbstractValidator 6 | { 7 | 8 | public ReceiveInvitationRequestValidator() 9 | { 10 | RuleFor(aReceiveInvitationRequest => aReceiveInvitationRequest.InvitationDetails) 11 | .NotEmpty(); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Connection/ReceiveInvitation/ReceiveInvitationResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Connections 2 | { 3 | using Aries.Features.Handshakes.Connection.Models; 4 | using Bases; 5 | using System; 6 | 7 | public class ReceiveInvitationResponse : BaseResponse 8 | { 9 | public ConnectionInvitationMessage ConnectionInvitationMessage { get; set; } = null!; 10 | 11 | public ReceiveInvitationResponse() { } 12 | 13 | public ReceiveInvitationResponse(Guid aCorrelationId, ConnectionInvitationMessage aConnectionInvitationMessage) 14 | : base(aCorrelationId) 15 | { 16 | ConnectionInvitationMessage = aConnectionInvitationMessage; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Connection/SendPing/SendPingRequest.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Connections 2 | { 3 | using MediatR; 4 | using Hyperledger.Aries.AspNetCore.Features.Bases; 5 | 6 | public class SendPingRequest : BaseApiRequest, IRequest 7 | { 8 | public const string RouteTemplate = BaseRequest.BaseUri + "connections/{ConnectionId}/send-ping"; 9 | 10 | /// 11 | /// The Id of the Connection to use to send the message 12 | /// 13 | /// Connection identifier 14 | public string ConnectionId { get; set; } = null!; 15 | 16 | internal override string GetRoute() => 17 | RouteTemplate.Replace($"{{{nameof(ConnectionId)}}}", ConnectionId, System.StringComparison.Ordinal); 18 | } 19 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Connection/SendPing/SendPingRequestValidator.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Connections 2 | { 3 | using FluentValidation; 4 | 5 | public class SendPingRequestValidator : AbstractValidator 6 | { 7 | public SendPingRequestValidator() 8 | { 9 | RuleFor(aSendPingRequest => aSendPingRequest.ConnectionId) 10 | .NotEmpty(); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Connection/SendPing/SendPingResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Connections 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using Hyperledger.Aries.AspNetCore.Features.Bases; 6 | 7 | public class SendPingResponse : BaseResponse 8 | { 9 | public bool Success { get; set; } 10 | 11 | public SendPingResponse() { } 12 | 13 | public SendPingResponse(Guid aCorrelationId, bool aSuccess) : base(aCorrelationId) { Success = aSuccess; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Connection/_._: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/src/Hyperledger.Aries.AspNetCore.Contracts/Features/Connection/_._ -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Credential/FeatureAnnotations.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Credentials 2 | { 3 | public static class FeatureAnnotations 4 | { 5 | public const string FeatureGroup = "Credential"; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Credential/GetCredential/GetCredentialRequest.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Credentials 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | using MediatR; 5 | 6 | public class GetCredentialRequest : BaseApiRequest, IRequest 7 | { 8 | public const string RouteTemplate = BaseRequest.BaseUri + "credentials/{CredentialId}"; 9 | 10 | /// 11 | /// The Id of the Credential to return 12 | /// 13 | /// 5 14 | public string CredentialId { get; set; } = null!; 15 | 16 | internal override string GetRoute() 17 | { 18 | string temp = RouteTemplate.Replace($"{{{nameof(CredentialId)}}}", CredentialId, System.StringComparison.Ordinal); 19 | return $"{temp}?{nameof(CorrelationId)}={CorrelationId}"; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Credential/GetCredential/GetCredentialRequestValidator.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Credentials 2 | { 3 | using FluentValidation; 4 | 5 | public class GetCredentialRequestValidator : AbstractValidator 6 | { 7 | public GetCredentialRequestValidator() 8 | { 9 | RuleFor(aGetCredentialRequest => aGetCredentialRequest.CredentialId) 10 | .NotEmpty(); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Credential/GetCredential/GetCredentialResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Credentials 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | using Hyperledger.Aries.Features.IssueCredential; 5 | using System; 6 | 7 | public class GetCredentialResponse : BaseResponse 8 | { 9 | public CredentialRecord? CredentialRecord { get; set; } 10 | 11 | public GetCredentialResponse() { } 12 | 13 | public GetCredentialResponse(Guid aCorrelationId, CredentialRecord aCredentialRecord) : base(aCorrelationId) 14 | { 15 | CredentialRecord = aCredentialRecord; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Credential/GetCredentials/GetCredentialsRequest.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Credentials 2 | { 3 | using MediatR; 4 | using Hyperledger.Aries.AspNetCore.Features.Bases; 5 | 6 | public class GetCredentialsRequest : BaseApiRequest, IRequest 7 | { 8 | public const string RouteTemplate = BaseRequest.BaseUri + "credentials"; 9 | 10 | internal override string GetRoute() => $"{RouteTemplate}?{nameof(CorrelationId)}={CorrelationId}"; 11 | } 12 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Credential/GetCredentials/GetCredentialsRequestValidator.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Credentials 2 | { 3 | using FluentValidation; 4 | 5 | public class GetCredentialsRequestValidator : AbstractValidator 6 | { 7 | public GetCredentialsRequestValidator() { } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Credential/GetCredentials/GetCredentialsResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Credentials 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using Hyperledger.Aries.AspNetCore.Features.Bases; 6 | using Hyperledger.Aries.Features.IssueCredential; 7 | 8 | public class GetCredentialsResponse : BaseResponse 9 | { 10 | public List CredentialRecords { get; set; } = null!; 11 | public GetCredentialsResponse() { } 12 | 13 | public GetCredentialsResponse(Guid aCorrelationId, List aCredentialRecords) : base(aCorrelationId) 14 | { 15 | CredentialRecords = aCredentialRecords; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Credential/RemoveCredential/RemoveCredentialRequestValidator.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Credentials 2 | { 3 | using FluentValidation; 4 | 5 | public class RemoveCredentialRequestValidator : AbstractValidator 6 | { 7 | public RemoveCredentialRequestValidator() 8 | { 9 | RuleFor(aRemoveCredentialRequest => aRemoveCredentialRequest.CredentialId) 10 | .NotEmpty(); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Credential/RemoveCredential/RemoveCredentialResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Credentials 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using Hyperledger.Aries.AspNetCore.Features.Bases; 6 | 7 | public class RemoveCredentialResponse : BaseResponse 8 | { 9 | public RemoveCredentialResponse() { } 10 | 11 | public RemoveCredentialResponse(Guid aCorrelationId) : base(aCorrelationId) { } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/CredentialDefinition/CreateCredentialDefinition/CreateCredentialDefinitionRequestValidator.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.CredentialDefinitions 2 | { 3 | using FluentValidation; 4 | 5 | public class CreateCredentialDefinitionRequestValidator : AbstractValidator 6 | { 7 | 8 | public CreateCredentialDefinitionRequestValidator() 9 | { 10 | RuleFor(aCreateCredentialDefinitionRequest => aCreateCredentialDefinitionRequest.SchemaId) 11 | .NotEmpty() 12 | .Matches("^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}:2:.+:[0-9.]+$"); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/CredentialDefinition/CreateCredentialDefinition/CreateCredentialDefinitionResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.CredentialDefinitions 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | using System; 5 | 6 | public class CreateCredentialDefinitionResponse : BaseResponse 7 | { 8 | public string CredentialDefinitionId { get; set; } = null!; 9 | 10 | public CreateCredentialDefinitionResponse() { } 11 | 12 | public CreateCredentialDefinitionResponse(Guid aCorrelationId, string aCredentialDefinitionId) : base(aCorrelationId) 13 | { 14 | CredentialDefinitionId = aCredentialDefinitionId; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/CredentialDefinition/FeatureAnnotations.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.CredentialDefinitions 2 | { 3 | public static class FeatureAnnotations 4 | { 5 | public const string FeatureGroup = "Credential Definition"; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/CredentialDefinition/GetCredentialDefinition/GetCredentialDefinitionRequestValidator.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.CredentialDefinitions 2 | { 3 | using FluentValidation; 4 | 5 | public class GetCredentialDefinitionRequestValidator : AbstractValidator 6 | { 7 | public GetCredentialDefinitionRequestValidator() 8 | { 9 | RuleFor(aGetCredentialDefinitionRequest => aGetCredentialDefinitionRequest.CredentialDefinitionId) 10 | .NotEmpty(); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/CredentialDefinition/GetCredentialDefinition/GetCredentialDefinitionResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.CredentialDefinitions 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | using Hyperledger.Aries.Models.Records; 5 | using System; 6 | 7 | public class GetCredentialDefinitionResponse : BaseResponse 8 | { 9 | public DefinitionRecord DefinitionRecord { get; set; } = null!; 10 | 11 | public GetCredentialDefinitionResponse() { } 12 | 13 | public GetCredentialDefinitionResponse(Guid aCorrelationId, DefinitionRecord aDefinitionRecord) 14 | : base(aCorrelationId) 15 | { 16 | DefinitionRecord = aDefinitionRecord; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/CredentialDefinition/GetCredentialDefinitions/GetCredentialDefinitionsRequest.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.CredentialDefinitions 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | using MediatR; 5 | 6 | public class GetCredentialDefinitionsRequest : BaseApiRequest, IRequest 7 | { 8 | public const string RouteTemplate = BaseRequest.BaseUri + "credential-definitions"; 9 | 10 | internal override string GetRoute() => $"{RouteTemplate}?{nameof(CorrelationId)}={CorrelationId}"; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/CredentialDefinition/GetCredentialDefinitions/GetCredentialDefinitionsRequestValidator.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.CredentialDefinitions 2 | { 3 | using FluentValidation; 4 | 5 | public class GetCredentialDefinitionsRequestValidator : AbstractValidator 6 | { 7 | public GetCredentialDefinitionsRequestValidator() { } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/CredentialDefinition/GetCredentialDefinitions/GetCredentialDefinitionsResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.CredentialDefinitions 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using Hyperledger.Aries.AspNetCore.Features.Bases; 6 | using Hyperledger.Aries.Models.Records; 7 | 8 | public class GetCredentialDefinitionsResponse : BaseResponse 9 | { 10 | public List DefinitionRecords { get; set; } = null!; 11 | public GetCredentialDefinitionsResponse() { } 12 | 13 | public GetCredentialDefinitionsResponse(Guid aCorrelationId, List aDefinitionRecords) 14 | : base(aCorrelationId) 15 | { 16 | DefinitionRecords = aDefinitionRecords; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Infrastructure/InternalsVisibleToClientAndServer.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | 4 | [assembly: InternalsVisibleTo("Hyperledger.Aries.AspNetCore.Client")] 5 | [assembly: InternalsVisibleTo("Hyperledger.Aries.AspNetCore.Client.Integration.Tests")] 6 | [assembly: InternalsVisibleTo("Hyperledger.Aries.AspNetCore.Server")] 7 | [assembly: InternalsVisibleTo("Hyperledger.Aries.AspNetCore.Server.Integration.Tests")] -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Introduction/_._: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/src/Hyperledger.Aries.AspNetCore.Contracts/Features/Introduction/_._ -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/IssueCredential/FeatureAnnotations.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.IssueCredentials 2 | { 3 | public static class FeatureAnnotations 4 | { 5 | public const string FeatureGroup = "Issue Credential"; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/IssueCredential/OfferCredential/OfferCredentialRequestValidator.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.IssueCredentials 2 | { 3 | using FluentValidation; 4 | 5 | public class OfferCredentialRequestValidator : AbstractValidator 6 | { 7 | 8 | public OfferCredentialRequestValidator() 9 | { 10 | //RuleFor(aOfferCredentialRequest => aOfferCredentialRequest.ConnectionId) 11 | // .NotEmpty(); 12 | //RuleFor(aOfferCredentialRequest => aOfferCredentialRequest.CredentialDefinitionId) 13 | // .NotEmpty(); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/IssueCredential/OfferCredential/OfferCredentialResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.IssueCredentials 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | using Hyperledger.Aries.Features.IssueCredential; 5 | using System; 6 | 7 | public class OfferCredentialResponse : BaseResponse 8 | { 9 | public CredentialOfferMessage CredentialOfferMessage { get; set; } = null!; 10 | 11 | public OfferCredentialResponse() { } 12 | 13 | public OfferCredentialResponse(Guid aCorrelationId) : base(aCorrelationId) { } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Ledger/_._: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/src/Hyperledger.Aries.AspNetCore.Contracts/Features/Ledger/_._ -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/PresentProof/AcceptProofRequest/AcceptProofRequestRequest.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.PresentProofs 2 | { 3 | using MediatR; 4 | using Hyperledger.Aries.AspNetCore.Features.Bases; 5 | 6 | public class AcceptProofRequestRequest : BaseApiRequest, IRequest 7 | { 8 | public const string RouteTemplate = BaseRequest.BaseUri + "present-proof/accept"; 9 | 10 | /// 11 | /// Set Properties and Update Docs 12 | /// 13 | /// TODO 14 | public string EncodedProofRequestMessage { get; set; } = null!; 15 | 16 | internal override string GetRoute() => RouteTemplate; 17 | } 18 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/PresentProof/AcceptProofRequest/AcceptProofRequestRequestValidator.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.PresentProofs 2 | { 3 | using FluentValidation; 4 | 5 | public class AcceptProofRequestRequestValidator : AbstractValidator 6 | { 7 | public AcceptProofRequestRequestValidator() 8 | { 9 | RuleFor(aAcceptProofRequestRequest => aAcceptProofRequestRequest.EncodedProofRequestMessage) 10 | .NotEmpty(); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/PresentProof/AcceptProofRequest/AcceptProofRequestResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.PresentProofs 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using Hyperledger.Aries.AspNetCore.Features.Bases; 6 | 7 | public class AcceptProofRequestResponse : BaseResponse 8 | { 9 | public AcceptProofRequestResponse() { } 10 | 11 | public AcceptProofRequestResponse(Guid aCorrelationId) : base(aCorrelationId) { } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/PresentProof/CreateProof/CreateProofRequestRequestValidator.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.PresentProofs 2 | { 3 | using FluentValidation; 4 | 5 | public class CreateProofRequestRequestValidator : AbstractValidator 6 | { 7 | 8 | public CreateProofRequestRequestValidator() 9 | { 10 | RuleFor(aCreateProofRequestRequest => aCreateProofRequestRequest.ProofRequest) 11 | .NotNull(); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/PresentProof/CreateProof/CreateProofRequestResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.PresentProofs 2 | { 3 | using System; 4 | using Hyperledger.Aries.AspNetCore.Features.Bases; 5 | using Hyperledger.Aries.Features.PresentProof; 6 | 7 | public class CreateProofRequestResponse : BaseResponse 8 | { 9 | public RequestPresentationMessage RequestPresentationMessage { get; set; } = null!; 10 | 11 | public CreateProofRequestResponse() { } 12 | 13 | public CreateProofRequestResponse 14 | ( 15 | RequestPresentationMessage aRequestPresentationMessage, 16 | Guid aCorrelationId 17 | ) : base(aCorrelationId) 18 | { 19 | RequestPresentationMessage = aRequestPresentationMessage; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/PresentProof/FeatureAnnotations.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.PresentProofs 2 | { 3 | public static class FeatureAnnotations 4 | { 5 | public const string FeatureGroup = "Present Proof/Verification"; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/PresentProof/GetCredentialsForProof/GetCredentialsForProofRequestValidator.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.PresentProofs 2 | { 3 | using FluentValidation; 4 | 5 | public class GetCredentialsForProofRequestValidator : AbstractValidator 6 | { 7 | public GetCredentialsForProofRequestValidator() 8 | { 9 | RuleFor(aGetCredentialsForProofRequest => aGetCredentialsForProofRequest.ProofId) 10 | .NotEmpty(); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/PresentProof/GetCredentialsForProof/GetCredentialsForProofResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.PresentProofs 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using Hyperledger.Aries.AspNetCore.Features.Bases; 6 | using Hyperledger.Aries.Features.IssueCredential; 7 | 8 | public class GetCredentialsForProofResponse : BaseResponse 9 | { 10 | public GetCredentialsForProofResponse() { } 11 | 12 | public List Credentials { get; set; } = null!; 13 | 14 | public GetCredentialsForProofResponse(List aCredentials, Guid aCorrelationId) : base(aCorrelationId) 15 | { 16 | Credentials = aCredentials; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/PresentProof/GetProof/GetProofRequest.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.PresentProofs 2 | { 3 | using MediatR; 4 | using Hyperledger.Aries.AspNetCore.Features.Bases; 5 | 6 | public class GetProofRequest : BaseApiRequest, IRequest 7 | { 8 | public const string RouteTemplate = BaseRequest.BaseUri + "present-proof/records/{ProofId}"; 9 | 10 | /// 11 | /// Set Properties and Update Docs 12 | /// 13 | /// TODO 14 | public string ProofId { get; set; } = null!; 15 | 16 | internal override string GetRoute() => $"{RouteTemplate}?{nameof(ProofId)}={ProofId}&{nameof(CorrelationId)}={CorrelationId}"; 17 | } 18 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/PresentProof/GetProof/GetProofRequestValidator.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.PresentProofs 2 | { 3 | using FluentValidation; 4 | 5 | public class GetProofRequestValidator : AbstractValidator 6 | { 7 | public GetProofRequestValidator() 8 | { 9 | RuleFor(aGetProofRequest => aGetProofRequest.ProofId) 10 | .NotEmpty(); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/PresentProof/GetProof/GetProofResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.PresentProofs 2 | { 3 | using System; 4 | using Hyperledger.Aries.AspNetCore.Features.Bases; 5 | using Hyperledger.Aries.Features.PresentProof; 6 | 7 | public class GetProofResponse : BaseResponse 8 | { 9 | public GetProofResponse() { } 10 | 11 | public ProofRecord ProofRecord { get; set; } = null!; 12 | 13 | public GetProofResponse(ProofRecord aProofRecord, Guid aCorrelationId) : base(aCorrelationId) 14 | { 15 | ProofRecord = aProofRecord; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/PresentProof/GetProofs/GetProofsRequest.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.PresentProofs 2 | { 3 | using MediatR; 4 | using Hyperledger.Aries.AspNetCore.Features.Bases; 5 | 6 | public class GetProofsRequest : BaseApiRequest, IRequest 7 | { 8 | public const string RouteTemplate = BaseRequest.BaseUri + "present-proof/records"; 9 | internal override string GetRoute() => $"{RouteTemplate}?{nameof(CorrelationId)}={CorrelationId}"; 10 | } 11 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/PresentProof/GetProofs/GetProofsRequestValidator.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.PresentProofs 2 | { 3 | using FluentValidation; 4 | 5 | public class GetProofsRequestValidator : AbstractValidator 6 | { 7 | 8 | public GetProofsRequestValidator() 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/PresentProof/GetProofs/GetProofsResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.PresentProofs 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using Hyperledger.Aries.AspNetCore.Features.Bases; 6 | using Hyperledger.Aries.Features.PresentProof; 7 | 8 | public class GetProofsResponse : BaseResponse 9 | { 10 | public GetProofsResponse() { } 11 | 12 | public GetProofsResponse(List aProofRecords, Guid aCorrelationId) : base(aCorrelationId) 13 | { 14 | ProofRecords = aProofRecords; 15 | } 16 | 17 | public List ProofRecords { get; set; } = null!; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Revocation/_._: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/src/Hyperledger.Aries.AspNetCore.Contracts/Features/Revocation/_._ -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Schema/CreateSchema/CreateSchemaRequestValidator.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Schemas 2 | { 3 | using FluentValidation; 4 | 5 | public class CreateSchemaRequestValidator : AbstractValidator 6 | { 7 | public CreateSchemaRequestValidator() 8 | { 9 | RuleFor(aCreateSchemaRequest => aCreateSchemaRequest.Name) 10 | .NotEmpty(); 11 | RuleFor(aCreateSchemaRequest => aCreateSchemaRequest.Version) 12 | .NotEmpty() 13 | .Matches("^[0-9.]+$"); 14 | RuleForEach(aCreateSchemaRequest => aCreateSchemaRequest.AttributeNames) 15 | .NotEmpty(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Schema/CreateSchema/CreateSchemaResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Schemas 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | using System; 5 | 6 | public class CreateSchemaResponse : BaseResponse 7 | { 8 | public string SchemaId { get; set; } = null!; 9 | 10 | public CreateSchemaResponse() { } 11 | 12 | public CreateSchemaResponse(Guid aCorrelationId, string aSchemaId) : base(aCorrelationId) 13 | { 14 | SchemaId = aSchemaId; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Schema/FeatureAnnotations.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Schemas 2 | { 3 | public static class FeatureAnnotations 4 | { 5 | public const string FeatureGroup = "Schema"; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Schema/GetSchema/GetSchemaRequest.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Schemas 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | using MediatR; 5 | 6 | public class GetSchemaRequest : BaseApiRequest, IRequest 7 | { 8 | public const string RouteTemplate = BaseRequest.BaseUri + "schemas/{SchemaId}"; 9 | 10 | /// 11 | /// Id of the Schema to return 12 | /// 13 | /// 5 14 | public string SchemaId { get; set; } = null!; 15 | 16 | internal override string GetRoute() 17 | { 18 | string temp = RouteTemplate.Replace($"{{{nameof(SchemaId)}}}", SchemaId, System.StringComparison.Ordinal); 19 | return $"{temp}?{nameof(CorrelationId)}={CorrelationId}"; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Schema/GetSchema/GetSchemaRequestValidator.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Schemas 2 | { 3 | using FluentValidation; 4 | 5 | public class GetSchemaRequestValidator : AbstractValidator 6 | { 7 | public GetSchemaRequestValidator() 8 | { 9 | RuleFor(aGetSchemaRequest => aGetSchemaRequest.SchemaId) 10 | .NotEmpty(); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Schema/GetSchema/GetSchemaResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Schemas 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | using Hyperledger.Aries.Models.Records; 5 | using System; 6 | 7 | public class GetSchemaResponse : BaseResponse 8 | { 9 | public SchemaRecord? SchemaRecord { get; set; } 10 | 11 | public GetSchemaResponse() { } 12 | 13 | public GetSchemaResponse(Guid aCorrelationId, SchemaRecord aSchemaRecord) : base(aCorrelationId) 14 | { 15 | SchemaRecord = aSchemaRecord; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Schema/GetSchemas/GetSchemasRequest.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Schemas 2 | { 3 | using MediatR; 4 | using Hyperledger.Aries.AspNetCore.Features.Bases; 5 | 6 | public class GetSchemasRequest : BaseApiRequest, IRequest 7 | { 8 | // Trinsic API Route /definitions/schemas 9 | public const string RouteTemplate = BaseRequest.BaseUri + "schemas"; 10 | 11 | internal override string GetRoute() => $"{RouteTemplate}?{nameof(CorrelationId)}={CorrelationId}"; 12 | } 13 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Schema/GetSchemas/GetSchemasRequestValidator.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Schemas 2 | { 3 | using FluentValidation; 4 | 5 | public class GetSchemasRequestValidator : AbstractValidator 6 | { 7 | public GetSchemasRequestValidator() { } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Schema/GetSchemas/GetSchemasResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Schemas 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | using Hyperledger.Aries.Models.Records; 5 | using System; 6 | using System.Collections.Generic; 7 | 8 | public class GetSchemasResponse : BaseResponse 9 | { 10 | public List SchemaRecords { get; set; } = null!; 11 | 12 | public GetSchemasResponse() { } 13 | 14 | public GetSchemasResponse(Guid aCorrelationId, List aSchemaRecords) : base(aCorrelationId) 15 | { 16 | SchemaRecords = aSchemaRecords; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/TrustPing/_._: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/src/Hyperledger.Aries.AspNetCore.Contracts/Features/TrustPing/_._ -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Wallet/FeatureAnnotations.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Wallets 2 | { 3 | public static class FeatureAnnotations 4 | { 5 | public const string FeatureGroup = "Agent"; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Wallet/GetWallet/GetWalletRequest.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Wallets 2 | { 3 | using MediatR; 4 | using Hyperledger.Aries.AspNetCore.Features.Bases; 5 | 6 | public class GetWalletRequest : BaseApiRequest, IRequest 7 | { 8 | public const string RouteTemplate = BaseRequest.BaseUri + "agent/provision"; 9 | 10 | internal override string GetRoute() => $"{RouteTemplate}?{nameof(CorrelationId)}={CorrelationId}"; 11 | } 12 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Wallet/GetWallet/GetWalletRequestValidator.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Wallets 2 | { 3 | using FluentValidation; 4 | 5 | public class GetWalletRequestValidator : AbstractValidator 6 | { 7 | 8 | public GetWalletRequestValidator() { } 9 | } 10 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Wallet/GetWallet/GetWalletResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Wallets 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | using Hyperledger.Aries.Configuration; 5 | using System; 6 | 7 | public class GetWalletResponse : BaseResponse 8 | { 9 | public ProvisioningRecord ProvisioningRecord { get; set; } = null!; 10 | 11 | public GetWalletResponse() { } 12 | 13 | public GetWalletResponse(Guid aRequestId, ProvisioningRecord aProvisioningRecord) : base(aRequestId) 14 | { 15 | ProvisioningRecord = aProvisioningRecord; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Wallet/ResetWallet/ResetWalletRequest.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Wallets 2 | { 3 | using Hyperledger.Aries.AspNetCore.Features.Bases; 4 | using MediatR; 5 | 6 | public class ResetWalletRequest : BaseApiRequest, IRequest 7 | { 8 | public const string RouteTemplate = BaseRequest.BaseUri + "agent/reset"; 9 | 10 | internal override string GetRoute() => $"{RouteTemplate}?{nameof(CorrelationId)}={CorrelationId}"; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore.Contracts/Features/Wallet/ResetWallet/ResetWalletResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Wallets 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using Hyperledger.Aries.AspNetCore.Features.Bases; 6 | 7 | public class ResetWalletResponse : BaseResponse 8 | { 9 | public ResetWalletResponse() { } 10 | 11 | public ResetWalletResponse(Guid aCorrelationId) : base(aCorrelationId) { } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore/Extensions/AriesOpenApiOptions.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Configuration 2 | { 3 | public class AriesOpenApiOptions 4 | { 5 | /// 6 | /// Enable Swagger UI 7 | /// 8 | /// Default is true 9 | public bool UseSwaggerUi { get; set; } = true; 10 | 11 | internal string RoutePrefix { get; set; } 12 | internal string SwaggerApiTitle { get; set; } 13 | internal string SwaggerEndPoint { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore/Features/Base/BaseEndpoint.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Bases 2 | { 3 | using MediatR; 4 | using Microsoft.AspNetCore.Mvc; 5 | using Microsoft.Extensions.DependencyInjection; 6 | using System.Threading.Tasks; 7 | 8 | [ApiController] 9 | [Produces("application/json")] 10 | public class BaseEndpoint : ControllerBase 11 | where TRequest : IRequest 12 | where TResponse : BaseResponse 13 | { 14 | private IMediator _mediator; 15 | 16 | protected IMediator Mediator => _mediator ??= HttpContext.RequestServices.GetService(); 17 | 18 | protected virtual async Task Send(TRequest aRequest) 19 | { 20 | TResponse response = await Mediator.Send(aRequest); 21 | 22 | return Ok(response); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore/Features/Base/BaseError.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Bases 2 | { 3 | public class BaseError 4 | { 5 | public string Message { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore/Features/Base/BaseException.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.AspNetCore.Features.Bases 2 | { 3 | using System; 4 | 5 | public class BaseException : Exception 6 | { 7 | public BaseException() { } 8 | 9 | public BaseException(string aMessage) : base(aMessage) { } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore/Features/Introduction/_._: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/src/Hyperledger.Aries.AspNetCore/Features/Introduction/_._ -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore/Features/Ledger/_._: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/src/Hyperledger.Aries.AspNetCore/Features/Ledger/_._ -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore/Features/Revocation/_._: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/src/Hyperledger.Aries.AspNetCore/Features/Revocation/_._ -------------------------------------------------------------------------------- /src/Hyperledger.Aries.AspNetCore/Features/TrustPing/_._: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-aries/aries-framework-dotnet/d160719bead5266d793e6fac2bfd3a5fea6d5a45/src/Hyperledger.Aries.AspNetCore/Features/TrustPing/_._ -------------------------------------------------------------------------------- /src/Hyperledger.Aries.Payments.SovrinToken/AnyAgentMessage.cs: -------------------------------------------------------------------------------- 1 | using Hyperledger.Aries.Agents; 2 | 3 | namespace Hyperledger.Aries.Payments.SovrinToken 4 | { 5 | internal class AnyAgentMessage : AgentMessage 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.Payments.SovrinToken/Hyperledger.Aries.Payments.SovrinToken.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | bin\$(Configuration)\$(TargetFramework)\Hyperledger.Aries.Payments.SovrinToken.xml 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.Routing.Edge/Hyperledger.Aries.Routing.Edge.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | bin\$(Configuration)\$(TargetFramework)\Hyperledger.Aries.Routing.Edge.xml 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | EdgeClientService.cs 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.Routing.Edge/IEdgeProvisioningService.cs: -------------------------------------------------------------------------------- 1 | using System.Threading; 2 | using System.Threading.Tasks; 3 | using Hyperledger.Aries.Configuration; 4 | 5 | namespace Hyperledger.Aries.Agents.Edge 6 | { 7 | public interface IEdgeProvisioningService 8 | { 9 | Task ProvisionAsync(AgentOptions options, CancellationToken cancellationToken = default); 10 | Task ProvisionAsync(CancellationToken cancellationToken = default); 11 | } 12 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.Routing.Mediator/Hyperledger.Aries.Routing.Mediator.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | bin\$(Configuration)\$(TargetFramework)\Hyperledger.Aries.Routing.Mediator.xml 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.Routing.Mediator/IRoutingStore.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | 4 | namespace Hyperledger.Aries.Routing 5 | { 6 | public interface IRoutingStore 7 | { 8 | Task AddRouteAsync(string destinationRoute, string inboxId); 9 | 10 | Task FindRouteAsync(string destinationRoute); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.Routing.Mediator/MediatorAgent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Hyperledger.Aries.Agents; 3 | 4 | namespace Hyperledger.Aries.Routing 5 | { 6 | public class DefaultMediatorAgent : AgentBase 7 | { 8 | public DefaultMediatorAgent(IServiceProvider provider) : base(provider) 9 | { 10 | } 11 | 12 | protected override void ConfigureHandlers() 13 | { 14 | AddConnectionHandler(); 15 | AddDiscoveryHandler(); 16 | AddTrustPingHandler(); 17 | AddHandler(); 18 | AddHandler(); 19 | AddHandler(); 20 | AddHandler(); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.Routing.Mediator/Records/DeviceInfoRecord.cs: -------------------------------------------------------------------------------- 1 | using Hyperledger.Aries.Storage; 2 | using Newtonsoft.Json; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace Hyperledger.Aries.Routing 8 | { 9 | public class DeviceInfoRecord : RecordBase 10 | { 11 | public DeviceInfoRecord() 12 | { 13 | Id = Guid.NewGuid().ToString(); 14 | } 15 | 16 | public override string TypeName => "Hyperledger.Aries.Routing.DeviceInfoRecord"; 17 | 18 | public string DeviceId { get; set; } 19 | 20 | public string DeviceVendor { get; set; } 21 | 22 | [JsonIgnore] 23 | public string InboxId { get => Get(); set => Set(value); } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.Routing.Mediator/Records/InboxItemRecord.cs: -------------------------------------------------------------------------------- 1 | using Hyperledger.Aries.Storage; 2 | using System; 3 | 4 | namespace Hyperledger.Aries.Routing 5 | { 6 | public class InboxItemRecord : RecordBase 7 | { 8 | public InboxItemRecord() => Id = Guid.NewGuid().ToString(); 9 | 10 | /// 11 | /// String representation of binary data in UTF-8 byte mark 12 | /// 13 | /// 14 | public string ItemData { get; set; } 15 | 16 | /// 17 | /// Timestamp when this message was received 18 | /// 19 | public long Timestamp { get; set; } 20 | 21 | public override string TypeName => "Hyperledger.Aries.Routing.InboxItemRecord"; 22 | } 23 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.Routing.Mediator/Records/RouteRecord.cs: -------------------------------------------------------------------------------- 1 | using Hyperledger.Aries.Storage; 2 | using Newtonsoft.Json; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace Hyperledger.Aries.Routing 8 | { 9 | public class RouteRecord : RecordBase 10 | { 11 | public override string TypeName => "Hyperledger.Aries.Routing.RouteRecord"; 12 | 13 | [JsonIgnore] 14 | public string InboxId { get => Get(); set => Set(value); } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.Routing.Mediator/Storage/IStorageService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Threading.Tasks; 4 | using Hyperledger.Aries.Decorators.Attachments; 5 | 6 | namespace Hyperledger.Aries.Routing.Mediator.Storage 7 | { 8 | public interface IStorageService 9 | { 10 | Task StoreBackupAsync(string backupId, IEnumerable attachments); 11 | Task> RetrieveBackupAsync(string backupId); 12 | Task> ListBackupsAsync(string backupId); 13 | Task> RetrieveBackupAsync(string backupId, long timestamp); 14 | } 15 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.Routing/DeleteInboxItemsMessage.cs: -------------------------------------------------------------------------------- 1 | using Hyperledger.Aries.Agents; 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | namespace Hyperledger.Aries.Routing 6 | { 7 | public class DeleteInboxItemsMessage : AgentMessage 8 | { 9 | /// 10 | /// Initializes a new instance of the class. 11 | /// 12 | public DeleteInboxItemsMessage() 13 | { 14 | Id = Guid.NewGuid().ToString(); 15 | Type = RoutingTypeNames.DeleteInboxItemsMessage; 16 | } 17 | 18 | /// 19 | /// Gets or sets the inbox item ids. 20 | /// 21 | /// 22 | /// The inbox item ids. 23 | /// 24 | public IEnumerable InboxItemIds { get; set; } 25 | } 26 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.Routing/GetInboxItemsMessage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Hyperledger.Aries.Agents; 3 | 4 | namespace Hyperledger.Aries.Routing 5 | { 6 | public class GetInboxItemsMessage : AgentMessage 7 | { 8 | public GetInboxItemsMessage() 9 | { 10 | Id = Guid.NewGuid().ToString(); 11 | Type = RoutingTypeNames.GetInboxItemsMessage; 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.Routing/GetInboxItemsResponseMessage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Hyperledger.Aries.Agents; 4 | 5 | namespace Hyperledger.Aries.Routing 6 | { 7 | public class GetInboxItemsResponseMessage : AgentMessage 8 | { 9 | /// 10 | /// Initializes a new instance of the class. 11 | /// 12 | public GetInboxItemsResponseMessage() 13 | { 14 | Id = Guid.NewGuid().ToString(); 15 | Type = RoutingTypeNames.GetInboxItemsResponseMessage; 16 | } 17 | 18 | /// 19 | /// Gets or sets the items. 20 | /// 21 | /// 22 | /// The items. 23 | /// 24 | public IEnumerable Items { get; set; } 25 | } 26 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.Routing/Hyperledger.Aries.Routing.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | bin\$(Configuration)\$(TargetFramework)\Hyperledger.Aries.Routing.xml 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.Routing/InboxItemEvent.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.Routing 2 | { 3 | public class InboxItemEvent 4 | { 5 | /// 6 | /// Gets or sets the inbox identifier. 7 | /// 8 | /// 9 | /// The inbox identifier. 10 | /// 11 | public string InboxId { get; set; } 12 | /// 13 | /// Gets or sets the item identifier. 14 | /// 15 | /// 16 | /// The item identifier. 17 | /// 18 | public string ItemId { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.Routing/InboxItemMessage.cs: -------------------------------------------------------------------------------- 1 | using Hyperledger.Aries.Agents; 2 | 3 | namespace Hyperledger.Aries.Routing 4 | { 5 | public class InboxItemMessage : AgentMessage 6 | { 7 | /// 8 | /// String representation of binary data in UTF-8 byte mark 9 | /// 10 | /// 11 | public string Data { get; set; } 12 | 13 | /// 14 | /// Timestamp when this message was received 15 | /// 16 | public long Timestamp { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.Routing/ListBackupsAgentMessage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Hyperledger.Aries.Agents; 3 | 4 | namespace Hyperledger.Aries.Routing 5 | { 6 | public class ListBackupsAgentMessage : AgentMessage 7 | { 8 | /// 9 | /// Initializes a new instance of the class. 10 | /// 11 | public ListBackupsAgentMessage() 12 | { 13 | Id = new Guid().ToString(); 14 | Type = BackupTypeNames.ListBackupsAgentMessage; 15 | } 16 | /// 17 | /// Gets or sets the backup identifier. 18 | /// 19 | /// 20 | /// The backup identifier. 21 | /// 22 | public string BackupId { get; set; } 23 | } 24 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.Routing/ListBackupsResponseAgentMessage.cs: -------------------------------------------------------------------------------- 1 | using Hyperledger.Aries.Agents; 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | namespace Hyperledger.Aries.Routing 6 | { 7 | public class ListBackupsResponseAgentMessage : AgentMessage 8 | { 9 | public ListBackupsResponseAgentMessage() 10 | { 11 | Id = Guid.NewGuid().ToString(); 12 | Type = BackupTypeNames.ListBackupsResponseAgentMessage; 13 | } 14 | 15 | public IEnumerable BackupList { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.Routing/RestoreInboxMessage.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Hyperledger.Aries.Agents.Edge 4 | { 5 | public class RestoreInboxMessage : AgentMessage 6 | { 7 | public string WalletId { get; set; } 8 | public string WalletKey { get; set; } 9 | 10 | public Dictionary Metadata { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.Routing/RetrieveBackupAgentMessage.cs: -------------------------------------------------------------------------------- 1 | using Hyperledger.Aries.Agents; 2 | using System; 3 | 4 | namespace Hyperledger.Aries.Routing 5 | { 6 | public class RetrieveBackupAgentMessage : AgentMessage 7 | { 8 | public RetrieveBackupAgentMessage() 9 | { 10 | Id = Guid.NewGuid().ToString(); 11 | Type = BackupTypeNames.RetrieveBackupAgentMessage; 12 | } 13 | 14 | public string BackupId { get; set; } 15 | public string Signature { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.Routing/RetrieveBackupResponseAgentMessage.cs: -------------------------------------------------------------------------------- 1 | using Hyperledger.Aries.Agents; 2 | using Hyperledger.Aries.Decorators.Attachments; 3 | using System; 4 | using System.Collections.Generic; 5 | 6 | namespace Hyperledger.Aries.Routing 7 | { 8 | public class RetrieveBackupResponseAgentMessage : AgentMessage 9 | { 10 | public RetrieveBackupResponseAgentMessage() 11 | { 12 | Id = Guid.NewGuid().ToString(); 13 | Type = BackupTypeNames.RetrieveBackupResponseAgentMessage; 14 | } 15 | 16 | public List Payload { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.Routing/StoreBackupAgentMessage.cs: -------------------------------------------------------------------------------- 1 | using Hyperledger.Aries.Agents; 2 | using Hyperledger.Aries.Decorators.Attachments; 3 | using System; 4 | using System.Collections.Generic; 5 | 6 | namespace Hyperledger.Aries.Routing 7 | { 8 | public class StoreBackupAgentMessage : AgentMessage 9 | { 10 | public StoreBackupAgentMessage() 11 | { 12 | Id = Guid.NewGuid().ToString(); 13 | Type = BackupTypeNames.StoreBackupAgentMessage; 14 | } 15 | 16 | public string BackupId { get; set; } 17 | public List Payload { get; set; } 18 | public string PayloadSignature { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.Routing/StoreBackupResponseAgentMessage.cs: -------------------------------------------------------------------------------- 1 | using Hyperledger.Aries.Agents; 2 | using System; 3 | 4 | namespace Hyperledger.Aries.Routing 5 | { 6 | public class StoreBackupResponseAgentMessage : AgentMessage 7 | { 8 | public StoreBackupResponseAgentMessage() 9 | { 10 | Id = Guid.NewGuid().ToString(); 11 | Type = BackupTypeNames.StoreBackupResponseAgentMessage; 12 | } 13 | public DateTimeOffset BackupTimestamp { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries.TestHarness/Mock/MockAgentMessageProcessor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | using Hyperledger.Aries.Agents; 4 | 5 | namespace Hyperledger.TestHarness.Mock 6 | { 7 | public class MockAgentMessageProcessor : AgentBase 8 | { 9 | public MockAgentMessageProcessor( 10 | IServiceProvider provider) : base(provider) 11 | { 12 | } 13 | 14 | protected override void ConfigureHandlers() 15 | { 16 | AddConnectionHandler(); 17 | AddForwardHandler(); 18 | } 19 | 20 | internal Task HandleAsync(MessageContext msg, IAgentContext context) => ProcessAsync(context, msg); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries.TestHarness/TestConstants.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.TestHarness 2 | { 3 | public static class TestConstants 4 | { 5 | public const string DefaultMockUri = "http://mock.com"; 6 | 7 | public const string DefaultMasterSecret = "DefaultMasterSecret"; 8 | 9 | public const string DefaultVerkey = "MeHaPyPGsbBCgMKo13oWK7MeHaPyPGsbBCgMKo13oWK7"; 10 | 11 | public const string StewardSeed = "000000000000000000000000Steward1"; 12 | 13 | public const string StewardDid = "Th7MpTaRZVRYnPiabds81Y"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Agents/Abstractions/IAgentMiddleware.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace Hyperledger.Aries.Agents 4 | { 5 | /// 6 | /// Agent middleware used to process a message after the message handler processing 7 | /// 8 | public interface IAgentMiddleware 9 | { 10 | /// 11 | /// Called when the message needs to be processed 12 | /// 13 | /// The agent context. 14 | /// The message context. 15 | /// 16 | Task OnMessageAsync(IAgentContext agentContext, UnpackedMessageContext messageContext); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Agents/Abstractions/IAgentProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace Hyperledger.Aries.Agents 4 | { 5 | /// 6 | /// Agent Context Provider. 7 | /// 8 | public interface IAgentProvider 9 | { 10 | /// 11 | /// Retrieves an agent context. 12 | /// 13 | /// Arguments 14 | /// The agent context async. 15 | Task GetContextAsync(params object[] args); 16 | 17 | /// 18 | /// Retrieves an agent instance. 19 | /// 20 | /// The agent async. 21 | /// Arguments. 22 | Task GetAgentAsync(params object[] args); 23 | } 24 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Agents/AgentContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Concurrent; 3 | 4 | namespace Hyperledger.Aries.Agents 5 | { 6 | /// 7 | /// Agent context that represents the context of a current agent. 8 | /// 9 | [Obsolete("This class is obsolete and will be removed. Please use 'DefaultAgentContext'")] 10 | public class AgentContext : DefaultAgentContext 11 | { 12 | 13 | } 14 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Agents/Transport/IMessageDispatcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | 4 | namespace Hyperledger.Aries.Agents 5 | { 6 | /// 7 | /// Message Dispatcher. 8 | /// 9 | public interface IMessageDispatcher 10 | { 11 | /// 12 | /// Supported transport schemes by the dispatcher. 13 | /// 14 | string[] TransportSchemes { get; } 15 | 16 | /// 17 | /// Sends a message using the dispatcher. 18 | /// 19 | /// Uri to dispatch the message to. 20 | /// Message context to dispatch. 21 | /// A message context. 22 | Task DispatchAsync(Uri uri, PackedMessageContext message); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Common/AcknowledgementStatusConstants.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.Common 2 | { 3 | /// 4 | /// Constants for the different status of an Acknowledgement Message 5 | /// 6 | public static class AcknowledgementStatusConstants 7 | { 8 | /// 9 | /// Status is OK 10 | /// 11 | public const string Ok = "OK"; 12 | 13 | /// 14 | /// Status is Failed 15 | /// 16 | public const string Failed = "FAIL"; 17 | 18 | /// 19 | /// Status is Pending 20 | /// 21 | public const string Pending = "PENDING"; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Common/EventAggregator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reactive.Linq; 3 | using System.Reactive.Subjects; 4 | using Hyperledger.Aries.Contracts; 5 | 6 | namespace Hyperledger.Aries.Runtime 7 | { 8 | /// 9 | //Modified from https://github.com/shiftkey/Reactive.EventAggregator 10 | public class EventAggregator : IEventAggregator 11 | { 12 | private readonly Subject _subject = new Subject(); 13 | 14 | /// 15 | public IObservable GetEventByType() => _subject.OfType().AsObservable(); 16 | 17 | /// 18 | public void Publish(TEvent eventToPublish) => _subject.OnNext(eventToPublish); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Common/MediaTypes.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.Common 2 | { 3 | public static class MediaTypes 4 | { 5 | public const string EncryptionEnvelopeV2 = "didcomm/aip2;env=rfc587"; 6 | 7 | public const string EncryptionEnvelopeV1 = "didcomm/aip2;env=rfc19"; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Features/BasicMessage/IBasicMessageService.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Hyperledger.Aries.Agents; 3 | 4 | namespace Hyperledger.Aries.Features.BasicMessage 5 | { 6 | /// 7 | /// Basic message service 8 | /// 9 | public interface IBasicMessageService 10 | { 11 | /// 12 | /// Processes the incoming basic message. 13 | /// 14 | /// The agent context. 15 | /// The connection id. 16 | /// The basic message. 17 | /// Records associated with the message. 18 | Task ProcessIncomingBasicMessageAsync(IAgentContext agentContext, string connectionId, BasicMessage basicMessage); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Features/Handshakes/Common/Dids/DidDocServiceEndpointTypes.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.Features.Handshakes.Common.Dids 2 | { 3 | /// 4 | /// Did document service endpoint types. 5 | /// 6 | public static class DidDocServiceEndpointTypes 7 | { 8 | /// 9 | /// The indy agent. 10 | /// 11 | public const string IndyAgent = "IndyAgent"; 12 | 13 | /// 14 | /// Did communication service endpoint 15 | /// https://github.com/hyperledger/aries-rfcs/blob/main/features/0067-didcomm-diddoc-conventions/README.md#service-conventions 16 | /// 17 | public const string DidCommunication = "did-communication"; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Features/Handshakes/Common/Dids/IDidDocServiceEndpoint.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace Hyperledger.Aries.Features.Handshakes.Common.Dids 4 | { 5 | /// 6 | /// DID doc service interface. 7 | /// 8 | public interface IDidDocServiceEndpoint 9 | { 10 | /// 11 | /// Id of the service. 12 | /// 13 | [JsonProperty("id")] 14 | string Id { get; set; } 15 | 16 | /// 17 | /// Type of the service. 18 | /// 19 | [JsonProperty("type")] 20 | string Type { get; } 21 | 22 | /// 23 | /// Endpoint of the service. 24 | /// 25 | [JsonProperty("serviceEndpoint")] 26 | string ServiceEndpoint { get; set; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Features/Handshakes/DidExchange/Models/DidExchangeCompleteMessage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Hyperledger.Aries.Agents; 3 | 4 | namespace Hyperledger.Aries.Features.Handshakes.DidExchange.Models 5 | { 6 | public class DidExchangeCompleteMessage : AgentMessage 7 | { 8 | public DidExchangeCompleteMessage() : base(true) 9 | { 10 | Id = Guid.NewGuid().ToString(); 11 | Type = MessageTypesHttps.DidExchange.Complete; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Features/Handshakes/DidExchange/Models/DidExchangeResponseMessage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Hyperledger.Aries.Agents; 3 | using Hyperledger.Aries.Decorators.Attachments; 4 | using Newtonsoft.Json; 5 | 6 | namespace Hyperledger.Aries.Features.Handshakes.DidExchange.Models 7 | { 8 | public class DidExchangeResponseMessage : AgentMessage 9 | { 10 | public DidExchangeResponseMessage() : base(true) 11 | { 12 | Id = Guid.NewGuid().ToString(); 13 | Type = MessageTypesHttps.DidExchange.Response; 14 | } 15 | 16 | [JsonProperty("did")] 17 | public string Did { get; set; } 18 | 19 | [JsonProperty("did_doc~attach", NullValueHandling = NullValueHandling.Ignore)] 20 | public Attachment DidDoc { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Features/Handshakes/HandshakeConstants.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.Features.Handshakes 2 | { 3 | /// Handshake protocol uris 4 | public static class HandshakeProtocolUri 5 | { 6 | /// The connections protocol based on Aries RFC-0160 7 | public const string Connections = "https://didcomm.org/connections/1.0"; 8 | /// the did exchange protocol based on Aries RFC-0023 9 | public const string DidExchange = "https://didcomm.org/didexchange/1.0"; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Features/Handshakes/HandshakeProtocol.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace Hyperledger.Aries.Features.Handshakes 4 | { 5 | /// Current supported handshake protocols 6 | public enum HandshakeProtocol 7 | { 8 | /// The connections protocol 9 | [EnumMember(Value = HandshakeProtocolUri.Connections)] 10 | Connections, 11 | /// The did exchange protocol 12 | [EnumMember(Value = HandshakeProtocolUri.DidExchange)] 13 | DidExchange 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Features/IssueCredential/Records/CredentialTrigger.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.Features.IssueCredential 2 | { 3 | /// 4 | /// Enumeration of possible triggers that change the credentials state 5 | /// 6 | public enum CredentialTrigger 7 | { 8 | /// 9 | /// The request 10 | /// 11 | Request, 12 | /// 13 | /// The issue 14 | /// 15 | Issue, 16 | /// 17 | /// The reject 18 | /// 19 | Reject, 20 | /// 21 | /// The revoke 22 | /// 23 | Revoke 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Features/OutOfBand/HandshakeReuseAcceptedMessage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Hyperledger.Aries.Agents; 3 | 4 | namespace Hyperledger.Aries.Features.OutOfBand 5 | { 6 | public class HandshakeReuseAcceptedMessage : AgentMessage 7 | { 8 | public HandshakeReuseAcceptedMessage() 9 | { 10 | Id = Guid.NewGuid().ToString(); 11 | Type = MessageTypesHttps.OutOfBand.HandshakeReuse; 12 | UseMessageTypesHttps = true; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Features/OutOfBand/HandshakeReuseMessage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Hyperledger.Aries.Agents; 3 | 4 | namespace Hyperledger.Aries.Features.OutOfBand 5 | { 6 | public class HandshakeReuseMessage : AgentMessage 7 | { 8 | public HandshakeReuseMessage() 9 | { 10 | Id = Guid.NewGuid().ToString(); 11 | Type = MessageTypesHttps.OutOfBand.HandshakeReuse; 12 | UseMessageTypesHttps = true; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Features/PresentProof/Models/RevocationInterval.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace Hyperledger.Aries.Features.PresentProof 4 | { 5 | /// 6 | /// Proof revocation interval. 7 | /// 8 | public class RevocationInterval 9 | { 10 | /// 11 | /// Gets or sets from. 12 | /// 13 | /// From. 14 | [JsonProperty("from")] 15 | public uint From { get; set; } 16 | 17 | /// 18 | /// Gets or sets to. 19 | /// 20 | /// To. 21 | [JsonProperty("to")] 22 | public uint To { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Features/ProblemReport/ProblemImpact.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.Features.ProblemReport 2 | { 3 | /// 4 | /// Problem impact severity. 5 | /// 6 | public enum ProblemImpact 7 | { 8 | /// 9 | /// Message level impact. 10 | /// 11 | message, 12 | /// 13 | /// Thread level impact. 14 | /// 15 | thread, 16 | /// 17 | /// Connection level impact. 18 | /// 19 | connection 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Features/ProblemReport/RetryParty.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.Features.ProblemReport 2 | { 3 | /// 4 | /// Enumeration of possible retry parties. 5 | /// 6 | public enum RetryParty 7 | { 8 | /// 9 | /// You as the retry party. 10 | /// 11 | you, 12 | /// 13 | /// Me as the retry party. 14 | /// 15 | me, 16 | /// 17 | /// Both parties retry. 18 | /// 19 | both, 20 | /// 21 | /// No party retries. 22 | /// 23 | none 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Features/RevocationNotification/RevocationNotificationAcknowledgeMessage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Hyperledger.Aries.Agents; 3 | using Hyperledger.Aries.Common; 4 | 5 | namespace Hyperledger.Aries.Features.RevocationNotification 6 | { 7 | /// 8 | /// Acknowledgement message for revocation notifications 9 | /// 10 | public class RevocationNotificationAcknowledgeMessage : AcknowledgeMessage 11 | { 12 | /// 13 | /// Initializes a new instance of class. 14 | /// 15 | public RevocationNotificationAcknowledgeMessage() : base(true) 16 | { 17 | Id = Guid.NewGuid().ToString(); 18 | Type = MessageTypesHttps.RevocationNotificationAcknowledgement; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Ledger/Models/ConstraintMetadata.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System.Text.Json.Serialization; 3 | 4 | namespace Hyperledger.Aries.Ledger 5 | { 6 | /// 7 | /// Constraint metadata 8 | /// 9 | public class ConstraintMetadata 10 | { 11 | /// 12 | /// Gets or sets the fee. 13 | /// 14 | /// 15 | /// The fee. 16 | /// 17 | [JsonProperty("fees")] 18 | [JsonPropertyName("fees")] 19 | public string Fee { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Ledger/Models/IndyTaa.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace Hyperledger.Aries.Ledger 4 | { 5 | /// 6 | /// Indy Transaction Author Agreement Model 7 | /// 8 | public class IndyTaa 9 | { 10 | /// 11 | /// The text of the agreement 12 | /// 13 | /// 14 | [JsonProperty("text")] 15 | public string Text { get; set; } 16 | 17 | /// 18 | /// The version of the agreement 19 | /// 20 | /// 21 | [JsonProperty("version")] 22 | public string Version { get; set; } 23 | } 24 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Ledger/Models/SchemaId.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.Ledger.Models 2 | { 3 | public struct SchemaId 4 | { 5 | public string Did { get; } 6 | 7 | public int TxnId => 2; 8 | 9 | public string Name { get; } 10 | 11 | public string Version { get; } 12 | 13 | public override string ToString() 14 | { 15 | return $"{Did}:{TxnId}:{Name}:{Version}"; 16 | } 17 | 18 | public SchemaId(string schemaId) 19 | { 20 | var parts = schemaId.Split(':'); 21 | Did = parts[0]; 22 | Name = parts[2]; 23 | Version = parts[3]; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Ledger/Models/ServiceEndpointResult.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace Hyperledger.Aries.Ledger.Models 4 | { 5 | /// 6 | /// Service endpoint result 7 | /// 8 | public class ServiceEndpointResult 9 | { 10 | [JsonProperty("endpoint")] 11 | public ServiceEndpoint Result { get; set; } 12 | 13 | /// 14 | /// Service endpoint 15 | /// 16 | public class ServiceEndpoint 17 | { 18 | [JsonProperty("endpoint")] 19 | public string Endpoint { get; set; } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Ledger/Models/TransactionActions.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.Ledger 2 | { 3 | /// 4 | /// Transaction actions 5 | /// 6 | public static class TransactionActions 7 | { 8 | /// 9 | /// ADD action 10 | /// 11 | public const string Add = "ADD"; 12 | 13 | /// 14 | /// EDIT action 15 | /// 16 | public const string Edit = "EDIT"; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Payments/Models/AddressOptions.cs: -------------------------------------------------------------------------------- 1 | namespace Hyperledger.Aries.Payments 2 | { 3 | /// 4 | /// Payment account configuration. 5 | /// 6 | public class AddressOptions 7 | { 8 | /// 9 | /// Account identifier 10 | /// 11 | public string Seed { get; set; } 12 | 13 | /// 14 | /// Gets or sets the method. 15 | /// 16 | /// The method. 17 | public string Method { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Payments/Models/PaymentMethod.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace Hyperledger.Aries.Payments 4 | { 5 | /// 6 | /// Payment method 7 | /// 8 | public class PaymentMethod 9 | { 10 | /// 11 | /// Gets or sets the supported methods. 12 | /// 13 | /// 14 | /// The supported methods. 15 | /// 16 | [JsonProperty("supportedMethods")] 17 | public string SupportedMethods { get; set; } 18 | 19 | /// 20 | /// Gets or sets the data. 21 | /// 22 | /// 23 | /// The data. 24 | /// 25 | [JsonProperty("data")] 26 | public PaymentMethodData Data { get; set; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Payments/Models/PaymentMethodData.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace Hyperledger.Aries.Payments 4 | { 5 | /// 6 | /// Payment method data 7 | /// 8 | public class PaymentMethodData 9 | { 10 | /// 11 | /// Gets or sets the supported networks. 12 | /// 13 | /// 14 | /// The supported networks. 15 | /// 16 | [JsonProperty("supportedNetworks")] 17 | public string[] SupportedNetworks { get; set; } 18 | 19 | /// 20 | /// Gets or sets the payee identifier. 21 | /// 22 | /// 23 | /// The payee identifier. 24 | /// 25 | [JsonProperty("payeeId")] 26 | public string PayeeId { get; set; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | [assembly:InternalsVisibleTo("Hyperledger.Aries.Payments.SovrinToken")] 4 | [assembly:InternalsVisibleTo("Hyperledger.Aries.Tests")] -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Signatures/ISigningService.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Hyperledger.Aries.Agents; 3 | 4 | namespace Hyperledger.Aries.Signatures 5 | { 6 | public interface ISigningService 7 | { 8 | public Task SignMessageAsync(IAgentContext context, string signingDid, byte[] message); 9 | 10 | public Task SignMessageAsync(IAgentContext context, string signingDid, string message); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Hyperledger.Aries/Storage/Records/Search/SearchResult.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json; 3 | 4 | namespace Hyperledger.Aries.Storage 5 | { 6 | /// 7 | /// Search record result. 8 | /// 9 | public class SearchResult 10 | { 11 | /// 12 | /// Gets or sets the resulting records. 13 | /// 14 | /// The resulting records. 15 | [JsonProperty("records")] 16 | public List Records { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /test/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome:http://EditorConfig.org 2 | # For dotnet and Csharp specific see below 3 | # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference 4 | 5 | # Set root = false if you want to inherit .editorconfig settings from parent directories 6 | root = false 7 | 8 | [*.cs] 9 | # CS0618: Type or member is obsolete 10 | # we still need to test obsolete items until they are removed 11 | dotnet_diagnostic.CS0618.severity = none 12 | 13 | # Default severity for analyzer diagnostics with category 'Style' 14 | dotnet_analyzer_diagnostic.category-Style.severity = none 15 | 16 | # CS1701: Assuming assembly reference matches identity 17 | dotnet_diagnostic.CS1701.severity = none 18 | -------------------------------------------------------------------------------- /test/Hyperledger.Aries.Tests/MockMessageHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Threading.Tasks; 4 | using Hyperledger.Aries.Agents; 5 | 6 | namespace Hyperledger.Aries.Tests 7 | { 8 | public class MockMessageHandler : IMessageHandler 9 | { 10 | public IEnumerable SupportedMessageTypes { get; } 11 | public Task ProcessAsync(IAgentContext agentContext, UnpackedMessageContext messageContext) 12 | { 13 | throw new NotImplementedException(); 14 | } 15 | } 16 | } 17 | --------------------------------------------------------------------------------