DataMaker.Sdk 0.1.0

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

DataMaker .NET SDK

Submit records to a Data Maker form from .NET, and render forms in ASP.NET Core. Two packages, two segments:

  • DataMaker.Sdk — pure submit logic. Read a signed .dmf bundle, validate values, sealed-box encrypt, POST to the public submissions endpoint.
  • DataMaker.Sdk.AspNetCore — an MVC/Razor TagHelper that renders a .dmf form (hosting the JS renderer) plus a server-side encrypt endpoint.

Standalone: own .dmf reader + libsodium sealed-box (Sodium.Core), wire- identical to the Data Maker app and to the JS/Python SDKs. No dependency on the app internals.

DataMaker.Sdk (submit)

using DataMaker.Sdk;

var client = new DataMakerClient();
var form   = DataMakerClient.ReadForm(File.ReadAllBytes("contact.dmf")); // verifies signature + hash

var result = await client.SubmitAsync(form, new Dictionary<string, object?>
{
    ["email"]     = "ada@example.com",
    ["full_name"] = "Ada",
});
// result.SubmissionId, result.EditToken, result.FormId
  • ReadForm(bytes, verify, includeRenderBundle)FormDescriptor. Verifies the publisher's Ed25519 manifest signature and that form.json matches its signed hash; throws DmfException on tampering.
  • BuildSubmission(form, values, opts) → validate + seal without sending.
  • SubmitAsync(form|dmfBytes, values, opts) → validate, seal, POST.
  • Validation throws ValidationException (with .Issues) for missing required fields, unknown keys, read-only kinds, and bad choices; values are coerced per field kind. SubmissionException carries a non-2xx status.

DataMaker.Sdk.AspNetCore (render)

Add the TagHelper, then drop a form into a Razor view:

@addTagHelper *, DataMaker.Sdk.AspNetCore

@* End-to-end: the browser seals values and posts ciphertext to /submissions.
   Your server never sees plaintext. *@
<datamaker-form dmf-path="forms/contact.dmf" encrypt="client" />

@* Server-side: the browser posts plaintext to your endpoint, which seals. *@
<datamaker-form dmf-path="forms/contact.dmf" encrypt="server" submit-url="/datamaker/submit" />

For server mode, map the seal endpoint (resolves a formId to its .dmf):

app.MapDataMakerSubmit("/datamaker/submit",
    formId => File.ReadAllBytes($"forms/{formId}.dmf"));

Both modes host the existing JS renderer (full styling, conditional visibility, calc fields, validation) — the render bundle is read straight from the .dmf v3, so no server-side bundle builder is needed. apply-form-style="false" renders structure-only (drops the .dmf author design so your site's CSS applies).

The renderer assets (renderer.js, fn.js, layout.css, styles.css, dm-submit.js) ship as static web assets at /_content/DataMaker.Sdk.AspNetCore/. Client mode also needs datamaker.browser.js — loaded from unpkg by default; override with browser-bundle-url.

Build & test

cd src/DataMaker.Sdk          && dotnet build
cd src/DataMaker.Sdk.AspNetCore && dotnet build
cd tests/DataMaker.Sdk.Tests  && dotnet test

License

BSD-3-Clause © FOBO Tools

Product Compatible and additional computed target framework versions.
.NET 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 (1)

Showing the top 1 NuGet packages that depend on DataMaker.Sdk:

Package Downloads
DataMaker.Sdk.AspNetCore

ASP.NET Core integration for Data Maker forms: a TagHelper that renders a signed .dmf form (hosting the JS renderer) and a server-side encrypt endpoint. Choose client-side end-to-end encryption or server-side sealing.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 43 6/7/2026