EverscaleNet 1.38.0

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

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

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!

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 (10)

Showing the top 5 NuGet packages that depend on EverscaleNet:

Package Downloads
EverscaleNet.Serialization

Everscale .Net Client

EverscaleNet.Adapter.Rust

Everscale .Net Client

EverscaleNet.Adapter.Base

Everscale .Net Client

EverscaleNet.Utils

Everscale .Net Client

EverscaleNet.Client

Everscale .Net Client

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.45.1 410 2/22/2024
1.44.4.5 734 11/27/2023
1.44.4.4 406 11/17/2023
1.44.4.3 364 11/16/2023
1.44.4.2 382 11/15/2023
1.44.4.1 554 11/14/2023
1.44.4 576 11/14/2023
1.44.3 699 9/12/2023
1.44.2 684 8/24/2023
1.44.1 782 7/31/2023
1.44.0 815 7/27/2023
1.43.3 861 6/26/2023
1.43.2 834 6/19/2023
1.43.1 860 6/3/2023
1.43.0 889 5/24/2023
1.42.2-alfa9 705 5/22/2023
1.42.2-alfa8 667 5/22/2023
1.42.2-alfa5 749 5/21/2023
1.42.2-alfa4 711 5/21/2023
1.42.2-alfa3 730 5/21/2023
1.42.2-alfa2 261 5/11/2023
1.42.2-alfa 276 5/11/2023
1.42.1 850 3/23/2023
1.42.0 796 3/22/2023
1.41.1 810 3/22/2023
1.41.0 1,037 2/15/2023
1.41.0-alfa6 283 2/14/2023
1.41.0-alfa5 296 2/14/2023
1.41.0-alfa3 318 2/14/2023
1.40.1-alfa 290 2/13/2023
1.40.0 1,332 1/12/2023
1.39.0 1,439 12/9/2022
1.38.1 1,657 11/12/2022
1.38.0.2 1,720 11/10/2022
1.38.0.1 1,665 11/10/2022
1.38.0 2,260 10/12/2022
1.37.2 2,275 9/17/2022
1.37.1 2,334 9/14/2022
1.37.0 1,721 8/3/2022
1.36.1 1,755 7/20/2022
1.36.0 1,813 7/14/2022
1.35.1 1,783 6/30/2022
1.35.0 1,723 6/28/2022
1.34.3 1,733 6/20/2022
1.34.2 1,788 6/1/2022
1.34.1 1,742 5/28/2022
1.33.1 1,803 5/11/2022
1.33.0 1,792 5/4/2022
1.32.0 1,853 4/3/2022
1.31.0 1,863 4/3/2022
1.30.0 2,243 2/5/2022
1.29.0 2,098 2/4/2022
1.28.0.4 2,033 1/29/2022
1.28.0.2 4,698 1/22/2022