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.
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.
// Install EverscaleNet.Client as a Cake Addin
#addin nuget:?package=EverscaleNet.Client&version=1.37.1

// Install EverscaleNet.Client as a Cake Tool
#tool nuget:?package=EverscaleNet.Client&version=1.37.1

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. 
.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.45.1 255 2/22/2024
1.44.4.5 555 11/27/2023
1.44.4.4 301 11/17/2023
1.44.4.3 259 11/16/2023
1.44.4.2 265 11/15/2023
1.44.4.1 392 11/14/2023
1.44.4 405 11/14/2023
1.44.3 512 9/12/2023
1.44.2 531 8/24/2023
1.44.1 587 7/31/2023
1.44.0 584 7/27/2023
1.43.3 614 6/26/2023
1.43.2 573 6/19/2023
1.43.1 604 6/3/2023
1.43.0 615 5/24/2023
1.42.2-alfa9 599 5/22/2023
1.42.2-alfa8 520 5/22/2023
1.42.2-alfa5 565 5/21/2023
1.42.2-alfa4 549 5/21/2023
1.42.2-alfa3 570 5/21/2023
1.42.2-alfa2 123 5/11/2023
1.42.2-alfa 115 5/11/2023
1.42.1 235 3/23/2023
1.42.0 203 3/22/2023
1.41.1 187 3/22/2023
1.41.0 231 2/15/2023
1.41.0-alfa6 98 2/14/2023
1.41.0-alfa5 114 2/14/2023
1.41.0-alfa3 120 2/14/2023
1.40.1-alfa 110 2/13/2023
1.40.0 281 1/12/2023
1.39.0 261 12/9/2022
1.38.1 312 11/12/2022
1.38.0.2 306 11/10/2022
1.38.0.1 305 11/10/2022
1.38.0 374 10/12/2022
1.37.2 383 9/17/2022
1.37.1 437 9/14/2022
1.37.0 403 8/3/2022
1.36.1 412 7/20/2022
1.36.0 427 7/14/2022
1.35.1 396 6/30/2022
1.35.0 386 6/28/2022
1.34.3 402 6/20/2022
1.34.2 422 6/1/2022
1.34.1 406 5/28/2022
1.33.1 404 5/11/2022
1.33.0 400 5/4/2022
1.32.0 437 4/3/2022
1.31.0 416 4/3/2022
1.30.0 456 2/5/2022
1.29.0 427 2/4/2022
1.28.0.4 416 1/29/2022
1.28.0.2 3,059 1/22/2022