Affinidi Iota Framework
Install Dependency
Package: AffinidiTdk.IotaClient
dotnet add package AffinidiTdk.IotaClient
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
Configurations API
Manage Affinidi Iota Framework configurations to integrate your application to request data from Affinidi Vault.
CreateIotaConfiguration
Create an Affinidi Iota Framework configuration.
Parameters
CreateIotaConfigurationInput [Object]
JSON object to provide the configuration details. See more here.
Example
using AffinidiTdk.IotaClient.Api;
using AffinidiTdk.IotaClient.Client;
using AffinidiTdk.IotaClient.Model;
Configuration config = new Configuration();
config.AddApiKey("authorization", projectScopedToken);
ConfigurationsApi api = new ConfigurationsApi(config);
CreateIotaConfigurationInput input = new CreateIotaConfigurationInput();
IotaConfigurationDto result = api.CreateIotaConfiguration(input);
DeleteIotaConfigurationById
Delete existing Affinidi Iota Framework configuration by ID.
Parameters
configurationId [String]
ID of the Affinidi Iota Configuration to delete.
Example
using AffinidiTdk.IotaClient.Api;
using AffinidiTdk.IotaClient.Client;
using AffinidiTdk.IotaClient.Model;
Configuration config = new Configuration();
config.AddApiKey("authorization", projectScopedToken);
ConfigurationsApi api = new ConfigurationsApi(config);
var configurationId = "<CONFIG_ID>";
api.DeleteIotaConfigurationById(configurationId);
GetIotaConfigurationById
Retrieves existing Affinidi Iota Framework by ID.
Parameters
configurationId [String]
ID of the Affinidi Iota Configuration to delete.
Example
using AffinidiTdk.IotaClient.Api;
using AffinidiTdk.IotaClient.Client;
using AffinidiTdk.IotaClient.Model;
Configuration config = new Configuration();
config.AddApiKey("authorization", projectScopedToken);
ConfigurationsApi api = new ConfigurationsApi(config);
var configurationId = "<CONFIG_ID>";
IotaConfigurationDto result = api.GetIotaConfigurationById(configurationId);
GetIotaConfigurationMetaData
Retrieves the Metadata of the existing Affinidi Iota Framework.
Parameters
projectId [String]
Project ID where the Affinidi Iota Framework was created.
configurationId [String]
ID of the existing Affinidi Iota Framework Configuration.
Example
using AffinidiTdk.IotaClient.Api;
using AffinidiTdk.IotaClient.Client;
using AffinidiTdk.IotaClient.Model;
Configuration config = new Configuration();
config.AddApiKey("authorization", projectScopedToken);
ConfigurationsApi api = new ConfigurationsApi(config);
var projectId = "<PROJECT_ID>";
var configurationId = "<CONFIG_ID>";
GetIotaConfigurationMetaDataOK result = api.GetIotaConfigurationMetaData(projectId, configurationId);
ListIotaConfigurations
List all the Affinidi Iota Framework configurations.
Parameters
No Parameters Required
Example
using AffinidiTdk.IotaClient.Api;
using AffinidiTdk.IotaClient.Client;
using AffinidiTdk.IotaClient.Model;
Configuration config = new Configuration();
config.AddApiKey("authorization", projectScopedToken);
ConfigurationsApi api = new ConfigurationsApi(config);
ListConfigurationOK result = api.ListIotaConfigurations();
UpdateIotaConfigurationById
Update an existing Affinidi Iota Framework by ID.
Parameters
configurationId [String]
ID of the existing Affinidi Iota Framework Configuration.
UpdateConfigurationByIdInput [Object]
JSON object to provide the configuration details. See more here.
Example
using AffinidiTdk.IotaClient.Api;
using AffinidiTdk.IotaClient.Client;
using AffinidiTdk.IotaClient.Model;
Configuration config = new Configuration();
config.AddApiKey("authorization", projectScopedToken);
ConfigurationsApi api = new ConfigurationsApi(config);
var configurationId = "<CONFIG_ID>";
UpdateConfigurationByIdInput input = new UpdateConfigurationByIdInput();
IotaConfigurationDto result = api.UpdateIotaConfigurationById(configurationId, input);
Iota API
Generate access token required to access the Affinidi Iota Framework.
AwsExchangeCredentials
Exchanges limited token into a Cognito token.
Parameters
AwsExchangeCredentials [String]
JWT string. See more here.
Example
using AffinidiTdk.IotaClient.Api;
using AffinidiTdk.IotaClient.Client;
using AffinidiTdk.IotaClient.Model;
Configuration config = new Configuration();
config.AddApiKey("authorization", projectScopedToken);
IotaApi api = new IotaApi(config);
AwsExchangeCredentials input = new AwsExchangeCredentials();
AwsExchangeCredentialsOK result = api.AwsExchangeCredentials(input);
InitiateDataSharingRequest
Initiate data-sharing request for Affinidi Iota Framework and returns the signed request token.
Parameters
InitiateDataSharingRequestInput [Object]
JSON object to provide the required details to initiate data sharing request. See more here.
Example
using AffinidiTdk.IotaClient.Api;
using AffinidiTdk.IotaClient.Client;
using AffinidiTdk.IotaClient.Model;
Configuration config = new Configuration();
config.AddApiKey("authorization", projectScopedToken);
IotaApi api = new IotaApi(config);
InitiateDataSharingRequestInput input = new InitiateDataSharingRequestInput();
InitiateDataSharingRequestOK result = api.InitiateDataSharingRequest(input);
FetchIotaVpResponse
Fetch the callback response from Affinidi Vault.
Parameters
FetchIOTAVPResponseInput [Object]
JSON object to provide the required details to the callback response. See more here.
Example
using AffinidiTdk.IotaClient.Api;
using AffinidiTdk.IotaClient.Client;
using AffinidiTdk.IotaClient.Model;
Configuration config = new Configuration();
config.AddApiKey("authorization", projectScopedToken);
IotaApi api = new IotaApi(config);
FetchIOTAVPResponseInput input = new FetchIOTAVPResponseInput();
FetchIOTAVPResponseOK result = api.FetchIotaVpResponse(input);
Default API
Manage logged consent from Affinidi Iota Framework.
ListLoggedConsents
Returns the list of logged consents for the project.
Parameters
configurationId [String]
Returns logged consent for the particular configuration.
userId [String]
Returns logged consent for the particular user.
limit [Integer]
Maximum number of records to fetch in a list.
exclusiveStartKey [String]
The base64url encoded key of the first item that this operation will evaluate (it is not returned). Use the value that was returned in the previous operation.
Example
using AffinidiTdk.IotaClient.Api;
using AffinidiTdk.IotaClient.Client;
using AffinidiTdk.IotaClient.Model;
Configuration config = new Configuration();
config.AddApiKey("authorization", projectScopedToken);
DefaultApi api = new DefaultApi(config);
var configurationId = "<CONFIG_ID>";
var userId = "<USER_ID>";
var limit = 56;
var exclusiveStartKey = "exclusiveStartKey_example";
ListLoggedConsentsOK result = api.ListLoggedConsents(configurationId, userId, limit, exclusiveStartKey);
Callback API
Manage logged consent from Affinidi Iota Framework.
IotOIDC4VPCallback
Handles callback from clients with data from the OID4VP transactions, including states, presentation submission, and verification tokens.
Parameters
CallbackInput [Object]
JSON object to provide the Callback data from the client. See more here.
Example
using AffinidiTdk.IotaClient.Api;
using AffinidiTdk.IotaClient.Client;
using AffinidiTdk.IotaClient.Model;
Configuration config = new Configuration();
config.AddApiKey("authorization", projectScopedToken);
CallbackApi api = new CallbackApi(config);
CallbackInput input = new CallbackInput();
CallbackResponseOK result = api.IotOIDC4VPCallback(input);
PexQueryAPI
CreatePexQuery
Creates a Presentation Definition in the Iota Configuration.
Parameters
configurationId [String]
ID of the existing Affinidi Iota Framework Configuration.
CreatePexQueryInput [Object]
JSON object to provide the PEX query details. See more here.
Example
using AffinidiTdk.IotaClient.Api;
using AffinidiTdk.IotaClient.Client;
using AffinidiTdk.IotaClient.Model;
Configuration config = new Configuration();
config.AddApiKey("authorization", projectScopedToken);
PexQueryApi api = new PexQueryApi(config);
var configurationId = "<CONFIG_ID>";
CreatePexQueryInput input = new CreatePexQueryInput();
PexQueryDto result = api.CreatePexQuery(configurationId, input);
DeletePexQueryById
Deletes a Presentation Definition based on the queryId from the Iota Configuration.
Parameters
configurationId [String]
ID of the existing Affinidi Iota Framework Configuration.
queryId [String]
ID of the existing Presentation Definition of the Affinidi Iota Configuration.
Example
using AffinidiTdk.IotaClient.Api;
using AffinidiTdk.IotaClient.Client;
using AffinidiTdk.IotaClient.Model;
Configuration config = new Configuration();
config.AddApiKey("authorization", projectScopedToken);
PexQueryApi api = new PexQueryApi(config);
var configurationId = "<CONFIG_ID>";
var queryId = "<QUERY_ID>";
api.DeletePexQueryById(configurationId, queryId);
GetPexQueryById
Retrieves a Presentation Definition based on the queryId from the Iota Configuration.
Parameters
configurationId [String]
ID of the existing Affinidi Iota Framework Configuration.
queryId [String]
ID of the existing Presentation Definition of the Affinidi Iota Configuration.
Example
using AffinidiTdk.IotaClient.Api;
using AffinidiTdk.IotaClient.Client;
using AffinidiTdk.IotaClient.Model;
Configuration config = new Configuration();
config.AddApiKey("authorization", projectScopedToken);
PexQueryApi api = new PexQueryApi(config);
var configurationId = "<CONFIG_ID>";
var queryId = "<QUERY_ID>";
PexQueryDto result = api.GetPexQueryById(configurationId, queryId);
ListPexQueries
Retrieves all Presentation Definition in the Iota Configuration.
Parameters
configurationId [String]
ID of the existing Affinidi Iota Framework Configuration.
Example
using AffinidiTdk.IotaClient.Api;
using AffinidiTdk.IotaClient.Client;
using AffinidiTdk.IotaClient.Model;
Configuration config = new Configuration();
config.AddApiKey("authorization", projectScopedToken);
PexQueryApi api = new PexQueryApi(config);
var configurationId = "<CONFIG_ID>";
ListPexQueriesOK result = api.ListPexQueries(configurationId);
UpdatePexQueryById
Updates a Presentation Definition based on the queryId from the Iota Configuration.
Parameters
configurationId [String]
ID of the existing Affinidi Iota Framework Configuration.
queryId [String]
ID of the existing Presentation Definition of the Affinidi Iota Configuration.
UpdatePexQueryInput [Object]
JSON object to provide the PEX query details. See more here.
Example
using AffinidiTdk.IotaClient.Api;
using AffinidiTdk.IotaClient.Client;
using AffinidiTdk.IotaClient.Model;
Configuration config = new Configuration();
config.AddApiKey("authorization", projectScopedToken);
PexQueryApi api = new PexQueryApi(config);
var configurationId = "<CONFIG_ID>";
var queryId = "<QUERY_ID>";
UpdatePexQueryInput input = new UpdatePexQueryInput();
PexQueryDto result = api.UpdatePexQueryById(configurationId, queryId, 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.