W6fux5.ChainKit.Core
0.1.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package W6fux5.ChainKit.Core --version 0.1.0
NuGet\Install-Package W6fux5.ChainKit.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="W6fux5.ChainKit.Core" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="W6fux5.ChainKit.Core" Version="0.1.0" />
<PackageReference Include="W6fux5.ChainKit.Core" />
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 W6fux5.ChainKit.Core --version 0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: W6fux5.ChainKit.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 W6fux5.ChainKit.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=W6fux5.ChainKit.Core&version=0.1.0
#tool nuget:?package=W6fux5.ChainKit.Core&version=0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ChainKit
Multi-chain blockchain SDK for .NET. Currently supports Tron.
Installation
dotnet add package W6fux5.ChainKit.Tron
W6fux5.ChainKit.Core is included as a dependency automatically.
Quick Start
using ChainKit.Tron;
using ChainKit.Tron.Crypto;
using ChainKit.Tron.Providers;
// Connect to Tron network
using var provider = new TronHttpProvider(TronNetwork.Nile); // Testnet
using var client = new TronClient(provider);
// Create or import account
var account = TronAccount.FromPrivateKey(Convert.FromHexString("your_private_key_hex"));
// Transfer TRX
var result = await client.TransferTrxAsync(account, "TReceiverAddress...", 10m);
if (result.Success)
Console.WriteLine($"TxId: {result.Data!.TxId}");
// Query balance
var balance = await client.GetBalanceAsync(account.Address);
Console.WriteLine($"TRX: {balance.Data!.TrxBalance}");
Features
High-Level API (TronClient)
- Transfer: TRX transfers with automatic ref block handling
- Balance: TRX + TRC20 token balances in one call
- Staking: Stake/unstake TRX for Energy/Bandwidth (Stake 2.0)
- Delegation: Delegate/undelegate resources to other addresses
- Resource Rate: Bidirectional TRX ↔ Energy/Bandwidth exchange rate estimation
- Transaction Detail: Merged Full Node + Solidity Node transaction info with status tracking
TRC20 Contracts (Trc20Contract)
- Token Info: Name, symbol, decimals, total supply, deployer address (parallel queries)
- Transfer / Approve / Allowance: Standard ERC20-compatible operations
- Mint / Burn: Extended operations for mintable/burnable tokens
- Deploy: Deploy custom TRC20 tokens from built-in template
Transaction Watching (TronTransactionWatcher)
- Real-time monitoring: Watch addresses for incoming/outgoing TRX and TRC20 transfers
- Confirmation tracking: Automatic Solidity Node confirmation with failure detection
- Two stream sources: PollingBlockStream (HTTP) or ZmqBlockStream (self-hosted node)
Providers
- TronHttpProvider: HTTP/HTTPS with dual endpoint support (Full Node + Solidity Node)
- TronGrpcProvider: gRPC for high-performance scenarios
- Optional ILogger: All classes accept optional
ILogger<T>for diagnostics
Dual Endpoint Setup
For accurate transaction confirmation, configure separate Full Node and Solidity Node endpoints:
var provider = new TronHttpProvider(
baseUrl: "http://your-fullnode:8090",
solidityUrl: "http://your-soliditynode:8091");
TRC20 Example
using var contract = client.GetTrc20Contract("TContractAddress...", account);
// Get token info
var info = await contract.GetTokenInfoAsync();
Console.WriteLine($"{info.Data!.Symbol} - Decimals: {info.Data.Decimals}");
// Transfer tokens
var tx = await contract.TransferAsync("TReceiverAddress...", 100m);
Resource Exchange Rate
var rate = await client.GetResourceExchangeRateAsync(ResourceType.Energy);
Console.WriteLine($"1 TRX = {rate.Data!.ResourcePerTrx:F2} Energy");
Console.WriteLine($"100 TRX = {rate.Data.EstimateResource(100m):F0} Energy");
Console.WriteLine($"10000 Energy = {rate.Data.EstimateTrx(10000):F2} TRX");
Requirements
- .NET 10.0+
License
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on W6fux5.ChainKit.Core:
| Package | Downloads |
|---|---|
|
W6fux5.ChainKit.Tron
Tron blockchain SDK for ChainKit — TRX transfers, TRC20 tokens, staking, transaction watching |
|
|
W6fux5.ChainKit.Evm
EVM-compatible blockchain SDK for ChainKit — Ethereum, Polygon, and other EVM chains |
GitHub repositories
This package is not used by any popular GitHub repositories.