A dotnet/C# SDK for Criipto Signatures
The SDK is available on Nuget and can be installed using the Package Manager Console or the dotnet CLI:
Install-Package Criipto.Signatures
dotnet add package Criipto.Signatures
var client = new CriiptoSignaturesClient("{YOUR_CRIIPTO_CLIENT_ID}", "{YOUR_CRIIPTO_CLIENT_SECRET}");
using Criipto.Signatures;
using Criipto.Signatures.Models;
using (var client = new CriiptoSignaturesClient("{YOUR_CRIIPTO_CLIENT_ID}", "{YOUR_CRIIPTO_CLIENT_SECRET}")) {
// Setup document input
var documents = new List<DocumentInput>{
new DocumentInput {
pdf = new PadesDocumentInput {
title = "Dotnet Sample",
blob = pdf,
storageMode = DocumentStorageMode.Temporary
}
}
};
// Setup signature order input
var createSignatureOrderInput = new CreateSignatureOrderInput
{
title = "Dotnet Sample",
documents = documents
};
// Create signature order
var signatureOrder = await client.CreateSignatureOrder(createSignatureOrderInput);
// Add signatory to signature order
var addSignatory = await client.AddSignatory(signatureOrder);
Console.WriteLine(addSignatory.href);
// ... after signing
// Close signature order
var closedSignatureOrder = await client.CloseSignatureOrder(signatureOrder);
}
More examples can be found in the test suite and in the documentation
Will return a Models.SignatureOrder
or null if signature order does not exist.
using Criipto.Signatures;
using (var client = new CriiptoSignaturesClient("{YOUR_CRIIPTO_CLIENT_ID}", "{YOUR_CRIIPTO_CLIENT_SECRET}")) {
var signatureOrder = await client.QuerySignatureOrder("{... signatureOrder id ..."});
}
Will return a Models.Signatory
or null if signatory does not exist.
using Criipto.Signatures;
using (var client = new CriiptoSignaturesClient("{YOUR_CRIIPTO_CLIENT_ID}", "{YOUR_CRIIPTO_CLIENT_SECRET}")) {
var signatureOrder = await client.QuerySignatory("{... signatory id ..."});
}