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.
#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 284 2/20/2025
1.48.1 589 11/13/2024
1.48.0 233 8/20/2024
1.47.0 188 7/19/2024
1.45.1 354 2/22/2024
1.44.4.5 626 11/27/2023
1.44.4.4 353 11/17/2023
1.44.4.3 343 11/16/2023
1.44.4.2 331 11/15/2023
1.44.4.1 500 11/14/2023
1.44.4 476 11/14/2023
1.44.3 583 9/12/2023
1.44.2 600 8/24/2023
1.44.1 666 7/31/2023
1.44.0 660 7/27/2023
1.43.3 705 6/26/2023
1.43.2 650 6/19/2023
1.43.1 694 6/3/2023
1.43.0 691 5/24/2023
1.42.2-alfa9 695 5/22/2023
1.42.2-alfa8 606 5/22/2023
1.42.2-alfa5 662 5/21/2023
1.42.2-alfa4 626 5/21/2023
1.42.2-alfa3 641 5/21/2023
1.42.2-alfa2 178 5/11/2023
1.42.2-alfa 179 5/11/2023
1.42.1 305 3/23/2023
1.42.0 270 3/22/2023
1.41.1 252 3/22/2023
1.41.0 296 2/15/2023
1.41.0-alfa6 146 2/14/2023
1.41.0-alfa5 168 2/14/2023
1.41.0-alfa3 184 2/14/2023
1.40.1-alfa 161 2/13/2023
1.40.0 356 1/12/2023
1.39.0 356 12/9/2022
1.38.1 383 11/12/2022
1.38.0.2 370 11/10/2022
1.38.0.1 374 11/10/2022
1.38.0 448 10/12/2022
1.37.2 453 9/17/2022
1.37.1 519 9/14/2022
1.37.0 543 8/3/2022
1.36.1 491 7/20/2022
1.36.0 505 7/14/2022
1.35.1 483 6/30/2022
1.35.0 472 6/28/2022
1.34.3 484 6/20/2022
1.34.2 500 6/1/2022
1.34.1 484 5/28/2022
1.33.1 491 5/11/2022
1.33.0 477 5/4/2022
1.32.0 505 4/3/2022
1.31.0 502 4/3/2022
1.30.0 541 2/5/2022
1.29.0 520 2/4/2022
1.28.0.4 516 1/29/2022
1.28.0.2 3,146 1/22/2022