AffinidiTdk.WalletsClient 1.4.0

dotnet add package AffinidiTdk.WalletsClient --version 1.4.0
                    
NuGet\Install-Package AffinidiTdk.WalletsClient -Version 1.4.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AffinidiTdk.WalletsClient" Version="1.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AffinidiTdk.WalletsClient" Version="1.4.0" />
                    
Directory.Packages.props
<PackageReference Include="AffinidiTdk.WalletsClient" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AffinidiTdk.WalletsClient --version 1.4.0
                    
#r "nuget: AffinidiTdk.WalletsClient, 1.4.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AffinidiTdk.WalletsClient@1.4.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AffinidiTdk.WalletsClient&version=1.4.0
                    
Install as a Cake Addin
#tool nuget:?package=AffinidiTdk.WalletsClient&version=1.4.0
                    
Install as a Cake Tool

Affinidi TDK .NET client for Wallets

Affinidi TDK dotnet client for Affinidi WALLETS

Getting Started

Prerequisites

Check your installed version:

dotnet --version

Installation

These are the steps to get you started with a dotnet project and integration with AffinidiTdk.WalletsClient.

Steps 1 & 2 are optional if you have already created a project.

  1. Create a new project directory

*On macOS / Linux / Windows (Powershell) 😗

mkdir MyProject
cd MyProject
  1. Initialize a .NET Project (dotnet template: console)
dotnet new console
  1. Installing the TDK Client (from nuget.org)
dotnet add package AffinidiTdk.WalletsClient

Usage

The AffinidiTdk.WalletsClient uses authorisation token to authenticate client requests. You can generate a token with the use of the AuthProvider package which is also available in nuget.org.

To generate a token, you first need to create your Personal Access Token (PAT). Please refer to this link.

  1. Import the required dependencies

The dependencies required may differ based on the Client API used in your application.

using AffinidiTdk.AuthProvider;
using AffinidiTdk.WalletsClient.Api;
using AffinidiTdk.WalletsClient.Client;
using AffinidiTdk.WalletsClient.Model;
  1. Create an AuthProvider
var authProvider = new AuthProvider(new AuthProviderParams
{
    // Please generate your own Personal Access Tokens (PAT). 
    // Refer to https://docs.affinidi.com/dev-tools/affinidi-tdk/get-access-token/#create-a-personal-access-token-pat for the guide on creating your own PAT.    
    TokenId = "YOUR_TOKEN_ID",
    PrivateKey = "YOUR_PRIVATE_KEY",
    ProjectId = "YOUR_PROJECT_ID"
    // Passphrase = "YOUR_PASSPHRASE", // Required only if provided in the PAT
});
  1. Fetch the ProjectScopedToken from the AuthProvider
string projectScopedToken = await authProvider.FetchProjectScopedTokenAsync();
  1. Create an instance of the Client Configuration
  • In this step, you can set the projectScopedToken in the configuration.

Configuration config = new Configuration();

config.AddApiKey("authorization", projectScopedToken);

  1. Create an instance of the Client API you intend to use
  • In this step, you should pass the config as a constructor argument in the Client API. NOTE: Each Operation requires different input. Please refer to the operation documentation for the details.


RevocationApi api = new RevocationApi(config);

var projectId = "projectId_example";
var walletId = "walletId_example";
var statusId = "statusId_example";

GetRevocationListCredentialResultDto result = api.GetRevocationCredentialStatus(projectId, walletId, statusId);

Console.WriteLine(result.ToJson());


For more examples, please refer to the Documentation.

Token Refresh

When handling tokens, it is important that your project access token is managed properly to prevent failures due to expired tokens.

We have created an example code which handles the automatic refresh of tokens to ensure that the token used in the client APIs are fresh.

Documentation

Client API Documentation

ClientAPI Operation Description
RevocationApi GetRevocationCredentialStatus
RevocationApi GetRevocationListCredential Return revocation list credential.
RevocationApi RevokeCredential Revoke Credential.
RevocationApi RevokeCredentials Revoke Credentials.
WalletApi CreateWallet
WalletApi CreateWalletV2
WalletApi DeleteWallet
WalletApi GetWallet
WalletApi ListWallets
WalletApi SignCredential
WalletApi SignCredentialsJwt
WalletApi SignCredentialsLdp
WalletApi SignCredentialsSdJwt
WalletApi SignJwtToken
WalletApi SignPresentationsLdp
WalletApi UpdateWallet

Note: Each Client API operation requires a different authorization token. Please check the operation details for the type of token required to use the operation properly.

Documentation For Models

Support & Feedback

If you face any issues or have suggestions, please don't hesitate to contact us using this link.

Reporting technical issues

If you have a technical issue with the Affinidi TDK's codebase, you can also create an issue directly in GitHub.

  1. Ensure the bug was not already reported by searching on GitHub under Issues.

  2. If you're unable to find an open issue addressing the problem, open a new one. Be sure to include a title and clear description, as much relevant information as possible, and a code sample or an executable test case demonstrating the expected behavior that is not occurring.

Contributing

We enjoy community contributions! Whether it’s bug fixes, feature requests, or improving docs, your input helps shape the Affinidi TDK.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.4.0 99 1/20/2026
1.1.0 215 10/1/2025

Minor update