EverscaleNet.Client 1.37.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package EverscaleNet.Client --version 1.37.1
                    
NuGet\Install-Package EverscaleNet.Client -Version 1.37.1
                    
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="EverscaleNet.Client" Version="1.37.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EverscaleNet.Client" Version="1.37.1" />
                    
Directory.Packages.props
<PackageReference Include="EverscaleNet.Client" />
                    
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 EverscaleNet.Client --version 1.37.1
                    
#r "nuget: EverscaleNet.Client, 1.37.1"
                    
#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 EverscaleNet.Client@1.37.1
                    
#: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=EverscaleNet.Client&version=1.37.1
                    
Install as a Cake Addin
#tool nuget:?package=EverscaleNet.Client&version=1.37.1
                    
Install as a Cake Tool

Main workflow Chat on Telegram <img src="https://avatars3.githubusercontent.com/u/67861283?s=150&u=4536b61595a1b422604fab8a7012092d891278f6&v=4" align="right" width="150">

Everscale .NET Client

Everscale is secure and scalable network. Lets do this network convenient both for users and developers!

  • This client was automatically generated from api.json (see ClientGenerator)
  • Fully supported methods provided in SDK documentation https://github.com/tonlabs/TON-SDK/tree/master/docs
  • No Newtonsoft.Json required, it is kinda legacy now, last release was over a year ago. New System.Text.Json is ten times faster
  • The most complete support of CancellationToken
  • Net Standard 2.1 compatible

Quick start

Add Nuget Package to your project

# Typical .Net application
dotnet add package EverscaleNet.Client

# Blazor WASM application
dotnet add package EverscaleNet.WebClient

Register in DI

Be careful! no network endpoints provided as default

public void ConfigureServices(IServiceCollection services)
{
    services.AddEverClient();
}

Ready to use everywhere

public class YourEverService {
    private readonly IEverClient _everClient;

    public YourEverService(IEverClient everClient) {
        _everClient = everClient;
    }
    
    public string GetEverSecretPhase() {
        var mnemonic = await _everClient.Crypto.MnemonicFromRandom(new ParamsOfMnemonicFromRandom());
        return mnemonic.Phrase;
    }
}

IPackageManager interface

There is easy option to load contracts abi and tvm info from files in this client.

Now available following async methods:

Task<Package> LoadPackage(string name); // Package entity just contains Abi and Tvc
Task<Abi> LoadAbi(string name);
Task<string> LoadTvc(string name);

Default contracts path is _contracts. Be careful, Blazor WASM app will search for _contracts relative to wwwroot.

Advanced client configuration

See configuration parameters:

public void ConfigureServices(IServiceCollection services)
{
    services.AddEverClient(config =>
    {
        config.Network.Endpoints = new[] { // see avalable networks https://tonlabs.gitbook.io/ton-sdk/reference/ton-os-api/networks#networks // };
        config.Network.NetworkRetriesCount = 5;
    }, packageManagerConfig =>
    {
        packageManagerConfig.PackagesPath = "packages"; // path to abi.json and tvc files, _contracts is default
    });  
}

or configure options by appsettings.json or another configuration provider

https://docs.microsoft.com/en-us/dotnet/core/extensions/configuration-providers

Example for appsettings.json
{
  "EverClient": {
    "Network": {
      "Endpoints": [ "https://eri01.net.everos.dev/", "https://rbx01.net.everos.dev/", "https://gra01.net.everos.dev/" ],
      "WaitForTimeout": 5000
    }
  },
  "PackageManager": {
    "PackagesPath": "my_app_contracts"
  }
}
public void ConfigureServices(IServiceCollection services)
{
    services.AddEverClient()        
        .Configure<EverClientOptions>(Configuration.GetSection("EverClient"))
        .Configure<PackageManagerOptions>(Configuration.GetSection("PackageManager"));
}

Logging

Fully compatible with https://docs.microsoft.com/en-us/dotnet/core/extensions/logging

Prototype type extensions

There are a few properties with type JsonElement in data models. And this client provide methods to easy convert this properties to/from Prototype.

Convert to Prototype example:

ResultOfParse parseResult = await everClient.Boc.ParseMessage(new ParamsOfParse
{
    Boc = "te6ccgEBAQEAWAAAq2n+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE/zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzSsG8DgAAAAAjuOu9NAL7BxYpA"
});
var parsedPrototype = new {type = default(int), id = default(string)};
var parsedMessage = parseResult.Parsed!.Value.ToPrototype(parsedPrototype);

_logger.LogInformation("Parsed message id: {id} type: {type}", parsedMessage.id, parsedMessage.type);

Convert from Prototype example:

await everClient.Net.WaitForCollection(new ParamsOfWaitForCollection
{
    Collection = "transactions",
    Filter = new {in_msg = new {eq = parsedMessage.id}}.ToJsonElement(),
    Result = "id"
});

Samples

https://github.com/everscale-actions/everscale-dotnet/tree/master/samples/

Support us

This project has no funding, but everyone can support.

Surf Wallet: 0:9b487d68e4f029ab6d92640892d99d1c549ae69b198df414e905350559a165bf

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  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 is compatible. 
.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 (1)

Showing the top 1 NuGet packages that depend on EverscaleNet.Client:

Package Downloads
EverscaleNet.TestSuite

Everscale .Net Client

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.49.1 397 2/20/2025
1.48.1 717 11/13/2024
1.48.0 303 8/20/2024
1.47.0 257 7/19/2024
1.45.1 433 2/22/2024
1.44.4.5 697 11/27/2023
1.44.4.4 385 11/17/2023
1.44.4.3 385 11/16/2023
1.44.4.2 373 11/15/2023
1.44.4.1 550 11/14/2023
1.44.4 524 11/14/2023
1.44.3 654 9/12/2023
1.44.2 664 8/24/2023
1.44.1 741 7/31/2023
1.44.0 745 7/27/2023
1.43.3 765 6/26/2023
1.43.2 722 6/19/2023
1.43.1 795 6/3/2023
1.43.0 767 5/24/2023
1.42.2-alfa9 771 5/22/2023
1.42.2-alfa8 678 5/22/2023
1.42.2-alfa5 743 5/21/2023
1.42.2-alfa4 709 5/21/2023
1.42.2-alfa3 705 5/21/2023
1.42.2-alfa2 234 5/11/2023
1.42.2-alfa 250 5/11/2023
1.42.1 366 3/23/2023
1.42.0 327 3/22/2023
1.41.1 308 3/22/2023
1.41.0 356 2/15/2023
1.41.0-alfa6 202 2/14/2023
1.41.0-alfa5 226 2/14/2023
1.41.0-alfa3 244 2/14/2023
1.40.1-alfa 214 2/13/2023
1.40.0 412 1/12/2023
1.39.0 431 12/9/2022
1.38.1 459 11/12/2022
1.38.0.2 429 11/10/2022
1.38.0.1 443 11/10/2022
1.38.0 510 10/12/2022
1.37.2 513 9/17/2022
1.37.1 582 9/14/2022
1.37.0 614 8/3/2022
1.36.1 559 7/20/2022
1.36.0 580 7/14/2022
1.35.1 567 6/30/2022
1.35.0 548 6/28/2022
1.34.3 551 6/20/2022
1.34.2 579 6/1/2022
1.34.1 535 5/28/2022
1.33.1 557 5/11/2022
1.33.0 558 5/4/2022
1.32.0 572 4/3/2022
1.31.0 577 4/3/2022
1.30.0 603 2/5/2022
1.29.0 598 2/4/2022
1.28.0.4 584 1/29/2022
1.28.0.2 3,215 1/22/2022