ZcapLd.Core 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package ZcapLd.Core --version 0.1.0
                    
NuGet\Install-Package ZcapLd.Core -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="ZcapLd.Core" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ZcapLd.Core" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="ZcapLd.Core" />
                    
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 ZcapLd.Core --version 0.1.0
                    
#r "nuget: ZcapLd.Core, 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 ZcapLd.Core@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=ZcapLd.Core&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=ZcapLd.Core&version=0.1.0
                    
Install as a Cake Tool

ZcapLd.Core

ZcapLd.Core is a .NET implementation of the W3C ZCAP-LD model for capability-based authorization.

Install

dotnet add package ZcapLd.Core

What It Provides

  • Root capability creation (urn:zcap:root:*)
  • Delegated capability creation with attenuation
  • Invocation signing and verification
  • Delegation chain verification
  • Caveat support (expiration and usage count)
  • Ed25519 signatures with multibase encoding

Quick Example

using ZcapLd.Core.Models;
using ZcapLd.Core.Services;

var signing = new SigningService();
var capabilities = new CapabilityService(signing);
var verifier = new VerificationService(signing, new CaveatProcessor());

var rootDid = "did:key:z6MkRoot";
var leafDid = "did:key:z6MkLeaf";

signing.GenerateAndRegisterKeyPair(rootDid);
signing.GenerateAndRegisterKeyPair(leafDid);

// Root capabilities only define root authority metadata.
var root = await capabilities.CreateRootCapabilityAsync(
    rootDid,
    "https://api.example.com/documents",
    new[] { "read", "write" });

// Restrictions (actions, caveats, expiry) are enforced on delegated capabilities.
var delegated = await capabilities.DelegateCapabilityAsync(
    root,
    leafDid,
    new[] { "read" },
    DateTime.UtcNow.AddDays(7),
    new Caveat[]
    {
        new ExpirationCaveat { Expires = DateTime.UtcNow.AddDays(3) }
    });

var invocation = new Invocation
{
    Capability = delegated.Id,
    CapabilityAction = "read",
    InvocationTarget = "https://api.example.com/documents/abc"
};

invocation.Proof = await signing.SignInvocationAsync(invocation, leafDid);
var isValid = await verifier.VerifyInvocationAsync(invocation, delegated);

Notes

  • This package is designed for in-process usage.
  • For production, use secure key management (HSM/KMS/Key Vault) instead of in-memory keys.
  • Data integrity processing currently uses deterministic JSON canonicalization rather than full RDF Dataset Canonicalization.

Documentation

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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 ZcapLd.Core:

Package Downloads
ZcapLd.AspNetCore

ASP.NET Core endpoint adapter for ZCAP-LD revocation workflows with pluggable revocation storage backends.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.0 110 3/27/2026
1.1.0 284 3/18/2026
1.0.0 99 3/9/2026
0.3.3 627 3/4/2026
0.3.2 183 3/1/2026
0.3.1 104 3/1/2026
0.3.0 100 2/28/2026
0.2.1 167 2/26/2026
0.2.0 103 2/26/2026
0.1.1 113 2/24/2026
0.1.0 108 2/20/2026