griffo-io / tron.net

GNU Lesser General Public License v3.0
40 stars 11 forks source link
csharp tron tron-protocol tronix

Build status NuGet GitHub license

tron.net

N|Solid

Tron.Net is a port in .NET standard of the Tron protocol

This library is still in experimental mode, use it with discretion, suggestions and PR are welcome.

Downloads

The latest stable release of the Tron.Net.Client available on NuGet

The latest stable release of the Tron.Net.Protocol available on NuGet

How to use it

Crypto

BouncyCastle is used as library to generate all hashes, the underlying decision on this is: it works, is fast, is reliable.

In order to create a new Address an ECKey must be created, make sure you store that, since at this moment there is no plan to provide a store for generated keys.

Generating a Tron wallet address (MainNet or TestNet) is as easy as 1 line of code

-- var address = WalletClient.MainNetWalletClient();

Examples

You can find in the tools folder 2 projects:

Advanced configuration

Tron.Net.Client is built upon the premise of flexibility, so the following interfaces to configure timeouts and Options for the respective grpc calls can be customised:

-- IWalletCallConfiguration

-- IWalletExtensionCallConfiguration

-- IWalletSolidityClientCallConfiguration

If using a DI framework like Autofac with assembly discovery, make sure to override the registration of AllClientsDefaultCallConfiguration which has a 10 seconds timeout by default

Logo Provided by Vecteezy