Zipwire.ProofPack.Ethereum 0.4.0

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

Zipwire.ProofPack.Ethereum

Ethereum integration for ProofPack: verifiable data exchange with EAS attestation support.

Overview

This package extends the core ProofPack library to support:

  • Ethereum L1 and L2 attestation verification (EAS)
  • ES256K JWS signing and verification
  • Utilities for working with Ethereum addresses and keys

Note: This package provides complete EAS attestation verification along with Ethereum-based signing and verification (ES256K). Supports Base Sepolia and other EAS-enabled networks.

Features

  • Sign and verify ProofPack envelopes using Ethereum keys (ES256K)
  • Ethereum curve and hasher support
  • EAS (Ethereum Attestation Service) integration: Complete attestation verification with factory pattern support for multiple networks
  • Designed for composability with the core ProofPack library

Installation

dotnet add package Zipwire.ProofPack.Ethereum

Usage Example

using Zipwire.ProofPack.Ethereum;

// Create a signer with your Ethereum private key
var signer = new ES256KJwsSigner(privateKey);

// Sign a ProofPack envelope (see core library for envelope creation)
var signed = await signer.SignAsync(header, payload);

// Verify a signed envelope
var verifier = new ES256KJwsVerifier(expectedSignerAddress);
var result = await verifier.VerifyAsync(signed);

Requirements

  • .NET Standard 2.1 or later
  • .NET 7.0 or later (for running tests)

Documentation

EAS Attestation Verification

This package provides comprehensive EAS attestation verification:

using Zipwire.ProofPack.Ethereum;

// Configure EAS networks
var networkConfig = new EasNetworkConfiguration(
    "Base Sepolia",
    "base-sepolia-provider", 
    "https://sepolia.base.org",
    loggerFactory);

// Create attestation verifier
var verifier = new EasAttestationVerifier(new[] { networkConfig });

// Use with AttestedMerkleExchangeReader
var verificationContext = AttestedMerkleExchangeVerificationContext.WithAttestationVerifierFactory(
    maxAge: TimeSpan.FromDays(30),
    resolveJwsVerifier: (algorithm, signerAddresses) =>
    {
        return algorithm switch
        {
            "ES256K" => new ES256KJwsVerifier(signerAddresses.First()),
            "RS256" => new DefaultRsaVerifier(publicKey),
            _ => null
        };
    },
    signatureRequirement: JwsSignatureRequirement.All,
    hasValidNonce: nonce => Task.FromResult(true),
    attestationVerifierFactory: factory);

var reader = new AttestedMerkleExchangeReader();
var result = await reader.ReadAsync(jwsJson, verificationContext);

if (result.IsValid)
{
    // Verify recipient matches expected wallet
    var expectedRecipient = "0x1234567890123456789012345678901234567890"; // User's wallet
    var attestedRecipient = result.Document.Attestation.Eas.To;

    if (attestedRecipient != null && attestedRecipient != expectedRecipient)
    {
        Console.WriteLine($"❌ Recipient verification failed: Expected {expectedRecipient}, Got {attestedRecipient}");
        // Handle recipient mismatch
    }
    else
    {
        Console.WriteLine($"✅ Recipient verification passed: {attestedRecipient ?? "None specified"}");
        // Use the verified document
    }
}

License

MIT — see LICENSE

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  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 was computed.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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
0.4.0 129 8/13/2025
0.2.2 231 8/6/2025
0.2.1 100 7/30/2025
0.2.0 103 7/29/2025
0.1.0 209 6/13/2025

Version 0.4.0 of Zipwire.ProofPack.Ethereum.
     - Add "issued to" functionality for proof certificate recipients
     - New WithIssuedTo fluent API methods for AttestedMerkleExchangeBuilder
     - Support for flexible key-value identifier system in attested proofs
     - Enhanced JSON structure validation and cross-platform compatibility
     - Updated to depend on Zipwire.ProofPack 0.4.0 with new IssuedTo features
     - Comprehensive test coverage for IssuedTo functionality in attested proofs