Utxorpc.Sdk
1.0.0-alpha
See the version list below for details.
dotnet add package Utxorpc.Sdk --version 1.0.0-alpha
NuGet\Install-Package Utxorpc.Sdk -Version 1.0.0-alpha
<PackageReference Include="Utxorpc.Sdk" Version="1.0.0-alpha" />
paket add Utxorpc.Sdk --version 1.0.0-alpha
#r "nuget: Utxorpc.Sdk, 1.0.0-alpha"
// Install Utxorpc.Sdk as a Cake Addin #addin nuget:?package=Utxorpc.Sdk&version=1.0.0-alpha&prerelease // Install Utxorpc.Sdk as a Cake Tool #tool nuget:?package=Utxorpc.Sdk&version=1.0.0-alpha&prerelease
<div align="center"> <h1 style="font-size: 3em;">Utxorpc.Sdk | .NET</h1> <h4>A gRPC interface for UTxO Blockchains</h4> </div> <div align="center"> <a href="https://www.nuget.org/packages/Utxorpc.Sdk/"> <img src="https://img.shields.io/nuget/v/Utxorpc.Sdk.svg" alt="NuGet"> </a> </div>
The Utxorpc.Sdk
provides a .NET interface for interacting with UTxO-based blockchains via gRPC. It simplifies the process of fetching blocks, following chain tips, and more, allowing developers to easily integrate blockchain data into their applications.
Features
- Fetch Blocks: Retrieve blocks by hash and index.
- Follow Chain Tips: Stream real-time updates as new blocks are applied, undone, or when the chain is reset.
- Future Expansion: Additional methods will be provided for watching transactions, submitting transactions, querying data, and more.
Installation
To install the SDK, use the following command in the NuGet Package Manager:
dotnet add package Utxorpc.Sdk --version 1.0.0-alpha
Alternatively, you can install it via the NuGet Package Manager in Visual Studio.
Usage
SyncServiceClient Example
The SyncServiceClient
allows you to fetch blocks and follow chain tips with ease. Below is an example of how to use it:
using Utxorpc.Sdk;
using Utxorpc.Sdk.Models;
var syncServiceClient = new SyncServiceClient("http://localhost:50051");
BlockRef blockRef = new BlockRef("1dace9bc646e9225251db04ff27397c199b04ec3f83c94cad28c438c3e7eeb50", 67823979);
Block? block = await syncServiceClient.FetchBlockAsync(blockRef);
if (block is not null)
{
Console.WriteLine($"Block Hash: {block.Hash}");
Console.WriteLine($"Slot: {block.Slot}");
Console.WriteLine($"Native Bytes: {BitConverter.ToString(block.NativeBytes)}");
}
else
{
Console.WriteLine("Block not found.");
}
Roadmap
- WatchServiceClient: Implementation for watching transactions.
- SubmitServiceClient: Methods for submitting and monitoring transactions.
- QueryServiceClient: Interface for querying blockchain data and parameters.
Contributing
Contributions are welcome! Please fork the repository and submit a pull request. For major changes, please open an issue first to discuss what you would like to change.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. |
-
net8.0
- Utxorpc.Spec (>= 0.9.0-alpha)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Utxorpc.Sdk:
Package | Downloads |
---|---|
Argus.Sync
A ASP.NET Framework for Indexing Cardano Data storing it in PostgresSQL |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.5.0-alpha | 46 | 11/24/2024 |
1.4.0-alpha | 40 | 11/24/2024 |
1.3.0-alpha | 44 | 11/23/2024 |
1.2.0-alpha | 38 | 10/31/2024 |
1.1.0-alpha | 85 | 10/7/2024 |
1.0.0-alpha | 71 | 8/22/2024 |
0.7.0-alpha | 52 | 7/15/2024 |
0.1.1-alpha | 72 | 1/31/2024 |
0.1.0-alpha | 54 | 1/31/2024 |