Wallets
Install Dependency
Package: AffinidiTdk.WalletsClient
dotnet add package AffinidiTdk.WalletsClient
You can check the latest version of this module on the nuget.org repository or view the source code at the GitHub repository.
Classes and Methods
Wallet API
Used to manage digital wallets for issuing credentials.
CreateWallet
Create a wallet by type.
Parameters
CreateWalletInput [Object]
JSON object to provide details for the wallet to create. See more here.
Example
using AffinidiTdk.WalletsClient.Client;
using AffinidiTdk.WalletsClient.Api;
using AffinidiTdk.WalletsClient.Model;
Configuration config = new Configuration();
config.AddApiKey("authorization", projectScopedToken);
WalletApi api = new WalletApi(config);
CreateWalletInput input = new CreateWalletInput(name: "DotNet Wallet", didMethod: CreateWalletInput.DidMethodEnum.Key);
CreateWalletResponse result = api.CreateWallet(input);
DeleteWallet
Delete a Wallet by ID.
Parameters
walletId [String]
ID of the Wallet to delete.
Example
using AffinidiTdk.WalletsClient.Client;
using AffinidiTdk.WalletsClient.Api;
using AffinidiTdk.WalletsClient.Model;
Configuration config = new Configuration();
config.AddApiKey("authorization", projectScopedToken);
WalletApi api = new WalletApi(config);
var walletId = "<WALLET_ID>";
api.DeleteWallet(walletId);
GetWallet
Retrieves the details of the Wallet.
Parameters
walletId [String]
ID of the Wallet to retrieve.
Example
using AffinidiTdk.WalletsClient.Client;
using AffinidiTdk.WalletsClient.Api;
using AffinidiTdk.WalletsClient.Model;
Configuration config = new Configuration();
config.AddApiKey("authorization", projectScopedToken);
WalletApi api = new WalletApi(config);
var walletId = "<WALLET_ID>";
WalletDto result = api.GetWallet(walletId);
ListWallets
Get the list of the Wallets.
Parameters
No Parameters Required
Example
using AffinidiTdk.WalletsClient.Client;
using AffinidiTdk.WalletsClient.Api;
using AffinidiTdk.WalletsClient.Model;
Configuration config = new Configuration();
config.AddApiKey("authorization", projectScopedToken);
WalletApi api = new WalletApi(config);
WalletsListDto result = api.ListWallets();
SignCredential
Sign a credentials with the Wallet details (DID document).
Parameters
walletId [String]
ID of the Wallet used for signing the credential.
SignCredentialInputDto [Object]
JSON object to provide the credential data to sign. See more here.
Example
using AffinidiTdk.WalletsClient.Client;
using AffinidiTdk.WalletsClient.Api;
using AffinidiTdk.WalletsClient.Model;
Configuration config = new Configuration();
config.AddApiKey("authorization", projectScopedToken);
WalletApi api = new WalletApi(config);
var walletId = "<WALLET_ID>";
SignCredentialInputDto input = new SignCredentialInputDto();
SignCredentialResultDto result = api.SignCredential(walletId, input);
SignJwtToken
Sign the JSON Web Token with the Wallet details (DID document).
Parameters
walletId [String]
ID of the Wallet used for signing the JWT.
SignCredentialInputDto [Object]
JSON object to provide the JWT data to sign. See more here.
Example
using AffinidiTdk.WalletsClient.Client;
using AffinidiTdk.WalletsClient.Api;
using AffinidiTdk.WalletsClient.Model;
Configuration config = new Configuration();
config.AddApiKey("authorization", projectScopedToken);
WalletApi api = new WalletApi(config);
var walletId = "<WALLET_ID>";
SignJwtToken input = new SignJwtToken();
SignJwtTokenOK result = api.SignJwtToken(walletId, input);
UpdateWallet
Update an existing Wallet by ID.
Parameters
walletId [String]
ID of the Wallet to update.
UpdateWalletInput [Object]
JSON object to provide details for the wallet to update. See more here.
Example
using AffinidiTdk.WalletsClient.Client;
using AffinidiTdk.WalletsClient.Api;
using AffinidiTdk.WalletsClient.Model;
Configuration config = new Configuration();
config.AddApiKey("authorization", projectScopedToken);
WalletApi api = new WalletApi(config);
var walletId = "<WALLET_ID>";
UpdateWalletInput input = new UpdateWalletInput();
WalletDto result = api.UpdateWallet(walletId, input);
Glad to hear it! Please tell us how we can improve more.
Sorry to hear that. Please tell us how we can improve.
Thank you for sharing your feedback so we can improve your experience.