ESigningService.Client 1.2.0

dotnet add package ESigningService.Client --version 1.2.0
                    
NuGet\Install-Package ESigningService.Client -Version 1.2.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="ESigningService.Client" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ESigningService.Client" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="ESigningService.Client" />
                    
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 ESigningService.Client --version 1.2.0
                    
#r "nuget: ESigningService.Client, 1.2.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 ESigningService.Client@1.2.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=ESigningService.Client&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=ESigningService.Client&version=1.2.0
                    
Install as a Cake Tool

ESigningService.Client

A self-contained .NET client SDK for the Emudra (emSigner) e-signing microservice. Drop it into any .NET 8+ service (ASP.NET Core, Worker Service, console) to call the signing APIs without re-implementing the HTTP contract.

What's in the box

  • IEmudraSigningFacade / EmudraSigningFacade — strongly-typed HTTP facade
  • AddEmudraSigningClient(...) — DI registration over IHttpClientFactory
  • EmudraClientOptions — typed configuration
  • EmudraClientException — surfaces gateway status code and response body
  • Request/result models (InitiateSigningRequest, SigningInitResult, SignedDocumentResult, TransactionStatusResult, CertificateDataResult)

Install

dotnet add package ESigningService.Client

Register

From configuration (binds the EmudraClient section):

builder.Services.AddEmudraSigningClient(
    builder.Configuration.GetSection(EmudraClientOptions.SectionName));

Or inline:

builder.Services.AddEmudraSigningClient(o =>
{
    o.BaseUrl = "https://gateway.example/esigning";
    o.TimeoutSeconds = 100;
});

appsettings.json:

{
  "EmudraClient": {
    "BaseUrl": "https://gateway.example/esigning",
    "BearerToken": null,
    "TimeoutSeconds": 100
  }
}

Use

public sealed class MySigningWorkflow(IEmudraSigningFacade signing)
{
    public async Task<string> SignAsync(string pdfBase64, string reference, CancellationToken ct)
    {
        var init = await signing.InitiateSigningAsync(new InitiateSigningRequest
        {
            FileBase64         = pdfBase64,
            ReferenceNumber    = reference,
            SignerName         = "TreasuryOfficer",
            SuccessCallbackUrl = "https://app/callback/success",
            FailureCallbackUrl = "https://app/callback/failure",
            CancelCallbackUrl  = "https://app/callback/cancel",
        }, ct);

        // Redirect the user to init.SigningUrl, then after the callback:
        var signed = await signing.GetSignedDocumentAsync(
            init.TransactionNumber, init.ReferenceNumber, ct);

        return signed.IsSuccess
            ? signed.SignedPdfBase64!
            : throw new InvalidOperationException(signed.ErrorMessage);
    }
}

EmudraClientException carries StatusCode and ResponseBody for diagnostics.

Compatibility

Multi-targets net7.0 and net8.0, so it is consumable from net7, net8, net9 and net10 projects (including the net7 TreasuryServer monolith and the net10 microservice). The only package dependencies are Microsoft.Extensions.Http and Microsoft.Extensions.Options.ConfigurationExtensions.

GetSigningResultAsync(transactionNumber, referenceNumber) calls the high-level api/v1/sign/result endpoint and returns the signed PDF; it throws EmudraClientException (carrying the HTTP status code) on a non-success response so callers can distinguish a definitive rejection (4xx) from a transient gateway failure (5xx).

Product 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 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.2.0 233 6/23/2026