KeyMint 1.1.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package KeyMint --version 1.1.1
NuGet\Install-Package KeyMint -Version 1.1.1
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="KeyMint" Version="1.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="KeyMint" Version="1.1.1" />
<PackageReference Include="KeyMint" />
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 KeyMint --version 1.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: KeyMint, 1.1.1"
#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 KeyMint@1.1.1
#: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=KeyMint&version=1.1.1
#tool nuget:?package=KeyMint&version=1.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Keymint .NET
A professional, production-ready SDK for integrating with the Keymint API in C# and other .NET languages. Provides robust, async-first access to all major Keymint features, with strong typing and modern error handling.
Features
- Async/await: All API calls are asynchronous.
- Strongly typed: Full support for .NET types and JSON serialization.
- Consistent error handling: All API errors are returned as structured
KeyMintResultobjects. - Machine Identity: Built-in utilities for hardware fingerprinting and stable installation IDs.
Installation
Add the SDK to your project:
dotnet add package KeyMint
Usage
using KeyMint.Services;
var accessToken = Environment.GetEnvironmentVariable("KEYMINT_ACCESS_TOKEN");
var productId = Environment.GetEnvironmentVariable("KEYMINT_PRODUCT_ID");
var client = new KeyMintSDK(accessToken);
// 1. Get a stable, unique ID for this machine
var hostId = KeyMintIdentity.GetOrCreateInstallationId();
// 2. Create a key authorized only for this machine
var result = await client.CreateKey(new CreateKeyParams {
ProductId = productId,
AllowedHosts = new List<string> { hostId }
});
if (result.IsSuccess) {
Console.WriteLine($"Created Key: {result.Data.Key}");
}
Machine Identity
Keymint provides utilities to uniquely identify machines for node-locking:
KeyMintIdentity.GetOrCreateInstallationId(): Recommended. Generates a stable UUID anchored to hardware and persists it to~/.keymint/installation-id.KeyMintIdentity.GetMachineId(): Generates a SHA-256 fingerprint based on BIOS UUID, OS machine ID, and MAC address.
API Methods
License Key Management
| Method | Description |
|---|---|
CreateKey |
Creates a new license key. |
ActivateKey |
Activates a license key for a device. |
DeactivateKey |
Deactivates a device from a license key. |
GetKey |
Retrieves detailed information about a key. |
BlockKey |
Blocks a license key. |
UnblockKey |
Unblocks a previously blocked license key. |
Customer Management
| Method | Description |
|---|---|
CreateCustomer |
Creates a new customer. |
GetAllCustomers |
Retrieves all customers. |
GetCustomerById |
Gets a specific customer by ID. |
GetCustomerWithKeys |
Gets a customer along with their license keys. |
UpdateCustomer |
Updates an existing customer's information. |
ToggleCustomerStatus |
Toggles a customer's active status. |
DeleteCustomer |
Permanently deletes a customer and their keys. |
License
MIT
Support
For help, see Keymint API docs or open an issue.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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.
-
net9.0
- Microsoft.Extensions.Logging (>= 9.0.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.