Evoq.Ethereum.EAS
1.0.5-alpha.1
dotnet add package Evoq.Ethereum.EAS --version 1.0.5-alpha.1
NuGet\Install-Package Evoq.Ethereum.EAS -Version 1.0.5-alpha.1
<PackageReference Include="Evoq.Ethereum.EAS" Version="1.0.5-alpha.1" />
paket add Evoq.Ethereum.EAS --version 1.0.5-alpha.1
#r "nuget: Evoq.Ethereum.EAS, 1.0.5-alpha.1"
// Install Evoq.Ethereum.EAS as a Cake Addin #addin nuget:?package=Evoq.Ethereum.EAS&version=1.0.5-alpha.1&prerelease // Install Evoq.Ethereum.EAS as a Cake Tool #tool nuget:?package=Evoq.Ethereum.EAS&version=1.0.5-alpha.1&prerelease
Evoq.Ethereum.EAS
A lightweight .NET library providing an easy-to-use implementation of the Ethereum Attestation Service (EAS). This package builds upon Evoq.Blockchain and Evoq.Ethereum to provide a simplified interface for working with EAS.
Installation
dotnet add package Evoq.Ethereum.EAS
Features
- Simple interface for creating and managing attestations
- Type-safe EAS primitives
- Easy integration with existing Ethereum applications
- Built on top of Evoq.Blockchain and Evoq.Ethereum
Target Frameworks
This package targets .NET Standard 2.1 for maximum compatibility across:
- .NET 6.0+
- .NET Framework 4.6.1+
- .NET Core 2.0+
- Xamarin
- Unity
Dependencies
- Evoq.Blockchain (1.0.0)
- Evoq.Ethereum (1.0.0)
Usage
// Initialize EAS with your endpoint and sender
var endpoint = SepoliaEndpointURL.Google(projectId, apiKey, loggerFactory);
var sender = new Sender(privateKey, nonceStore);
// Create schema registry instance
var registry = new SchemaRegistryNethereum(endpoint, sender, loggerFactory);
// Define and register a schema
var schemaString = "string name, uint8 age";
var schemaUID = SchemaRegistryNethereum.GetSchemaUID(schemaString, revocable: true, EthereumAddress.Zero);
// Check if schema exists, register if it doesn't
var schema = await registry.GetSchema(schemaUID);
if (schema == null)
{
var registeredUID = await registry.Register(schemaString, resolver: null, revocable: true);
Console.WriteLine($"Registered new schema with UID: {registeredUID}");
}
// Create an attestation
var eas = new EASNethereum(endpoint, sender, loggerFactory);
// Prepare attestation data
var data = new SchemaEncoder(schemaString).AbiEncode(
new object[] { "Alice", 25 }
);
var requestData = new AttestationRequestData(
Recipient: recipientAddress,
ExpirationUnixTimestamp: UInt64.MaxValue,
Revocable: true,
RefUID: Hex.Zero,
Data: new Hex(data),
Value: 0
);
var attestationRequest = new AttestationRequest(
Schema: schemaUID.ToHexStruct(),
Data: requestData
);
// Submit the attestation
var attestationUID = await eas.AttestAsync(attestationRequest);
Console.WriteLine($"Created attestation with UID: {attestationUID}");
Building
dotnet build
dotnet test
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Luke Puplett
Project Links
Product | Versions 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. |
.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. |
-
.NETStandard 2.1
- Evoq.Blockchain (>= 1.0.0)
- Evoq.Ethereum (>= 1.0.4-alpha.1)
- SimpleBase (>= 4.0.2)
- System.Text.Json (>= 7.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.