ZcapLd.Core
6.0.0
See the version list below for details.
dotnet add package ZcapLd.Core --version 6.0.0
NuGet\Install-Package ZcapLd.Core -Version 6.0.0
<PackageReference Include="ZcapLd.Core" Version="6.0.0" />
<PackageVersion Include="ZcapLd.Core" Version="6.0.0" />
<PackageReference Include="ZcapLd.Core" />
paket add ZcapLd.Core --version 6.0.0
#r "nuget: ZcapLd.Core, 6.0.0"
#:package ZcapLd.Core@6.0.0
#addin nuget:?package=ZcapLd.Core&version=6.0.0
#tool nuget:?package=ZcapLd.Core&version=6.0.0
ZcapLd.Core
.NET 10 library for the supported ZCAP v0.4.0 profile: root and delegated capabilities, Ed25519/P-256 proofs, controller authorization, replay protection, and signed revocation. Proofs use RDFC-1.0 through DataProofs and NetCrypto.
Provide an IDidSigner and IDidResolver; no private-key store is installed by default.
DidKeyResolver handles did:key. For several DID methods, register one adapter per method
in a CompositeDidResolver (full prefixes such as "did:web:"): it routes key resolution
and controller authorization to the adapter for the controller's method, so each adapter should
also implement NetDid's IVerificationRelationshipResolver. Key-only adapters fail closed.
var signing = new SigningService(didSigner, didResolver);
var capabilities = new CapabilityService(signing);
var root = await capabilities.CreateRootCapabilityAsync(ownerDid, "https://example.com/reports");
var child = await capabilities.DelegateCapabilityAsync(root, agentDid, new[] { "read" },
DateTime.UtcNow.AddDays(1));
var verifier = new VerificationService(didResolver);
var invocation = capabilities.CreateInvocation(child, "read");
invocation.Proof = await signing.SignInvocationAsync(invocation, agentDid);
bool authorized = await verifier.VerifyInvocationAsync(invocation, child, root);
Supply the root explicitly as above, or configure IRootCapabilityResolver.
For cross-stack invocation use SignCapabilityInvocationAsync and
VerifyCapabilityInvocationAsync; the relying party supplies its expected action
and target. The root is referenced by ID; a delegated invocation embeds the zcap.
Prefer expires, allowedAction and an optional delegation invocationTarget.
Without a CaveatTypeRegistry, incoming caveat fields are rejected even when null
or empty, and equivalent IRI/prefixed keys and nested restrictions are rejected
throughout capability/proof JSON. Contexts must be zcap/v1, a supported proof-suite
context or a registered caveat context; inline aliases and unrelated vocabularies are
unsupported.
Version 6 restores custom caveats as an opt-in extension profile (#157), which other
ZCAP stacks do not accept. Subclass Caveat and register the class with
CaveatTypeRegistry. Pass the registry to SigningService, CapabilityService and
VerificationService, and register an ICaveatHandler per type at the resource. Every
parameter is signed through a pinned per-type context. Children must restate and narrow
inherited caveats. Only invocation verification authorizes caveats; chain checks return
CaveatEnforcementRequired. See docs/CAVEAT-PROFILE.md in the repository.
VerificationPolicy.AllowTargetAttenuation defaults to false; explicitly enable
it for path/query narrowing. The target API must enforce parameter semantics.
Use IRevocationStore and signed revocation requests. Replicated verifiers must
share authoritative revocation state; there is no automatic polling of a URI
supplied by a capability holder. INonceStore must likewise be shared when replay
protection spans verifier instances.
Revocation records are keyed by the capability id and a RevocationScope: the delegator that
signed the capability (the DID of its delegation proof's verification method, as
bedrock-zcap-storage keys them), the root, or, for migrated 5.x and operator records only,
every chain. A forged copy of an id under another chain lands in the forger's scope, where no
genuine chain looks. Custom IRevocationStores key rows by RevocationRecord.Key, never by the
id. See Revocation scope.
ZcapLd needs reflection-based System.Text.Json, so native AOT, trimmed apps and .NET 10
file-based apps (dotnet run app.cs) are not supported yet: the first delegation throws
InvalidOperationException ("Reflection-based serialization has been disabled…"), and nothing
is authorized. Use a regular net10.0 project (#154).
See the repository for the full guide, policy options, examples and live JavaScript interoperability tests.
| Product | Versions 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. |
-
net10.0
- DataProofsDotnet.Core (>= 2.0.0)
- DataProofsDotnet.Legacy (>= 2.0.0)
- DataProofsDotnet.Rdfc (>= 2.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.14)
- NetCid (>= 1.6.0)
- NetCrypto (>= 1.7.1)
- NetDid.Core (>= 4.0.0)
- NetDid.Method.Key (>= 4.0.0)
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 |
|---|---|---|
| 6.0.1 | 113 | 11/10/2026 |
| 6.0.0 | 688 | 11/3/2026 |
| 5.0.0 | 264 | 10/25/2026 |
| 4.2.0 | 1,312 | 7/28/2026 |
| 4.1.0 | 4,156 | 7/14/2026 |
| 4.0.0 | 265 | 6/19/2026 |
| 3.0.0 | 161 | 6/6/2026 |
| 2.1.1 | 200 | 5/2/2026 |
| 2.1.0 | 138 | 5/2/2026 |
| 2.0.0 | 155 | 4/29/2026 |
| 1.2.0 | 380 | 3/27/2026 |
| 1.1.0 | 334 | 3/18/2026 |
| 1.0.0 | 149 | 3/9/2026 |
| 0.3.3 | 673 | 3/4/2026 |
| 0.3.2 | 232 | 3/1/2026 |
| 0.3.1 | 153 | 3/1/2026 |
| 0.3.0 | 157 | 2/28/2026 |
| 0.2.1 | 218 | 2/26/2026 |
| 0.2.0 | 155 | 2/26/2026 |
| 0.1.1 | 166 | 2/24/2026 |