EvidentProof.API.Client.Sdk
1.0.0
dotnet add package EvidentProof.API.Client.Sdk --version 1.0.0
NuGet\Install-Package EvidentProof.API.Client.Sdk -Version 1.0.0
<PackageReference Include="EvidentProof.API.Client.Sdk" Version="1.0.0" />
<PackageVersion Include="EvidentProof.API.Client.Sdk" Version="1.0.0" />
<PackageReference Include="EvidentProof.API.Client.Sdk" />
paket add EvidentProof.API.Client.Sdk --version 1.0.0
#r "nuget: EvidentProof.API.Client.Sdk, 1.0.0"
#:package EvidentProof.API.Client.Sdk@1.0.0
#addin nuget:?package=EvidentProof.API.Client.Sdk&version=1.0.0
#tool nuget:?package=EvidentProof.API.Client.Sdk&version=1.0.0
EvidentProof.API.Client.Sdk
EvidentProof.API.Client.Sdk is a .NET client library for interacting with the Evident Proof evidence platform. It lets you dispatch evidence, request validation proof certificates, retrieve PDF versions of those certificates, and check API usage statistics.
Installation
Install the package from NuGet:
dotnet add package EvidentProof.API.Client.Sdk
Or via the NuGet Package Manager console:
Install-Package EvidentProof.API.Client.Sdk
Prerequisites
- .NET 7.0 or later.
- The following configuration values, obtained from Evident Proof:
EVIDENCE_API_ENDPOINT— the base URL of the evidence API.SAMPLE_API_KEY— your API key for authentication.SERVICE_AGREEMENT_IDENTIFIER— the identifier for your service agreement.
Store these in appsettings.json, environment variables, or user secrets, and read them via IConfiguration in your application — do not hard-code them.
Usage
Step 1: Creating evidence
Use EvidenceBuilder to create evidence as key/value pairs:
using EvidentProof.API.Client.Builders;
var evidence = new EvidenceBuilder()
.UsingKeyAndValue("Email 1", "user1@example.com")
.UsingKeyAndValue("Phone 1", "+1 (555) 100-0001")
// Add more key-value pairs as needed
.Build();
Step 2: Creating a dispatch header
Use DispatchHeaderBuilder to create a header for dispatching evidence. You can also attach an audit context using .WithAuditContext() to provide additional metadata for proof certificates:
using EvidentProof.API.Client;
using EvidentProof.API.Client.Builders;
using EvidentProof.API.EvidenceAPI.RequestsAndResponses.VersionIndependent;
var dispatchHeader = new DispatchHeaderBuilder()
.UsingServiceAgreement(serviceAgreementIdentifier)
.ForSourceSystemDispatchReference("Test SSDR")
.From("Test Location")
.At(DateTime.UtcNow)
.WithAuditContext(new DispatchAuditContext
{
EventStatementDefinition = "Customer identity verified at point of sale",
ProofCertificateForTheAttentionOf = "Compliance Team"
})
.Build();
Step 3: Adding tags
Use DispatchTagsBuilder to add tags to your evidence:
var tags = new DispatchTagsBuilder()
.WithTag("Sample tag 1")
.WithTag("Sample tag 2")
.Build();
Step 4: Dispatching evidence
Dispatch the evidence to the platform using FreeFormDispatchService:
using EvidentProof.API.Client.Services;
var dispatchReceipt = await new FreeFormDispatchService()
.UseBaseUrl(evidenceApiEndpoint)
.UsingApiKey(apiKey)
.UseHeader(dispatchHeader)
.UseEvidence(evidence)
.UseTags(tags)
.Submit();
Console.WriteLine($"Dispatch Receipt: {dispatchReceipt.ReceiptIdentifier}");
Step 5: Creating a proof certificate request
Use ValidationProofCertificateRequestBuilder to request a proof certificate:
var proofRequest = new ValidationProofCertificateRequestBuilder()
.ForProofEvent("Disputed data evidence history verification")
.RequestedBy("Test Requester")
.ProvidingProofUpToAndIncluding(DateTime.UtcNow)
.UsingServiceAgreement(serviceAgreementIdentifier)
.ForSourceSystemDispatchReference("Test SSDR")
.DeliverTo("Evident Proof", "someone@evident-proof.com")
.ForCase("Case name", "123456")
.WithLegalAdviser("Legal adviser name")
.WithDataCustodians("Data custodians", "datacustodians@evident-proof.com")
.WithDataOwners("Data owners", "dataowners@evident-proof.com")
.WithDataSubOwners("Sub owners", "datasubowners@evident-proof.com")
.WithViewingRestrictions("Must have prior written permission")
.WithConfidentialityStatement("Strictly confidential, restricted to interested parties and authorised viewers")
.WithInterestParties("Bill Payer, Annie Body, Aggrieved Party", "Reason for interest")
.UsingReceipt(dispatchReceipt.ReceiptIdentifier.ToString(), evidence)
.Build();
Step 6: Submitting the proof certificate request
Submit the request using ValidationProofCertificateService:
var validationReceipt = await new ValidationProofCertificateService()
.WithBaseUrl(evidenceApiEndpoint)
.UsingApiKey(apiKey)
.Submit(proofRequest);
Console.WriteLine($"Validation Proof Certificate Identifier: {validationReceipt.ProofCertificateIdentifier}");
Step 7: Retrieving the PDF certificate
Use ProofCertificatePdfService to retrieve the PDF. Poll until the certificate is ready:
var proofCertificateIdentifier = validationReceipt.ProofCertificateIdentifier;
await Task.Delay(TimeSpan.FromSeconds(30));
var pdfResponse = await new ProofCertificatePdfService()
.WithBaseUrl(evidenceApiEndpoint)
.UsingApiKey(apiKey)
.UsingServiceAgreement(serviceAgreementIdentifier)
.ForProofCertificateIdentifier(proofCertificateIdentifier)
.Submit();
if (pdfResponse.Status == HttpStatusCode.OK)
{
var targetFile = Path.Combine(AppContext.BaseDirectory, $"{proofCertificateIdentifier}.pdf");
await File.WriteAllBytesAsync(targetFile, pdfResponse.Pdf);
Console.WriteLine($"PDF saved to: {targetFile}");
}
else
{
Console.WriteLine($"Status: {pdfResponse.Status}, waiting...");
}
Step 8: Checking API usage statistics
Use StatisticsService to retrieve usage statistics:
var stats = await new StatisticsService()
.WithBaseUrl(evidenceApiEndpoint)
.UseApiKey(apiKey)
.UsingServiceAgreement(serviceAgreementIdentifier)
.Submit();
Console.WriteLine($"Statistics: {stats}");
Full example
The steps above form a complete workflow — evidence creation, dispatch, proof certificate request, PDF retrieval, and usage statistics. Adapt the evidence data, tags, and request details to your own use case.
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
-
net7.0
- BerkshireCloud.Extensions.Core (>= 2021.2.2.2)
- BerkshireCloud.Extensions.Validation (>= 2020.5.18.1)
- EvidentProof.API.EvidenceAPI.RequestsAndResponses.V2 (>= 1.0.0)
- EvidentProof.API.EvidenceAPI.RequestsAndResponses.VersionIndependent (>= 1.0.0)
- EvidentProof.Domain.SharedTypes (>= 1.0.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- Wdc.System.Net.Http.Formatting.NetStandard (>= 1.0.7)
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.0.0 | 123 | 7/15/2026 |
Initial release of EvidentProof.API.Client.Sdk. Supports Evident Proof platform V2.