https://github.com/griffo-io/tron.net
https://github.com/griffo-io/tron.net
csharp tron tron-protocol tronix
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/griffo-io/tron.net
- Owner: griffo-io
- License: lgpl-3.0
- Created: 2018-06-07T07:59:08.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-02-11T02:31:08.000Z (over 4 years ago)
- Last Synced: 2025-09-30T07:55:27.224Z (8 months ago)
- Topics: csharp, tron, tron-protocol, tronix
- Language: C#
- Size: 154 KB
- Stars: 40
- Watchers: 5
- Forks: 11
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://ci.appveyor.com/project/dariogriffo/tron-net)
[](https://www.nuget.org/packages/Tron.Net.Client/)
[](https://github.com/griffo-io/tron.net/blob/master/LICENSE)
# tron.net
[](https://github.com/griffo-io/tron.net)
Tron.Net is a port in .NET standard of the [Tron protocol](https://github.com/tronprotocol/)
###### 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](https://www.nuget.org/packages/Tron.Net.Client)
The latest stable release of the Tron.Net.Protocol [available on NuGet](https://www.nuget.org/packages/Tron.Net.Protocol)
# How to use it
- You can download the Tron.Net.Client package, implement the `IChannelConfiguration` interface, and use the implementation of the different services avaiable:
-- `IWallet`
-- `IWalletExtension`
-- `IWalletSolidity`
or
- You can download the Tron.Net.Protocol and create your own library to interact with the Tron Network using the Tron.Net.Protocol.Api.Grpc generated clients
# Crypto
[BouncyCastle](https://www.bouncycastle.org/csharp/index.html) 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:
- Tron.Net.Client.NetCoreRunnerTest a simple dotnet core application that connects to a local node that contains an example with a JSON configuration
- Tron.Net.Client.Tron.Net.Client.NetFrameworkRunnerTest a simple dotnet framework 4.7 application that connects to a local node that contains an example with a configuration via AppSettings
# 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](https://vecteezy.com)