Skip to content

Commit 648f847

Browse files
committed
README updated
1 parent 7d68227 commit 648f847

File tree

1 file changed

+30
-19
lines changed

1 file changed

+30
-19
lines changed

README.md

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,38 @@
11
TonLib.NET
22
===========
33

4-
Wrapper around `tonlibjson` library for accessing [Telegram Open Network](https://ton.org/) lite servers (nodes) via ADNL protocol.
4+
Wrapper around `tonlibjson` library for accessing [Telegram Open Network](https://ton.org/) lite servers (nodes) directly via ADNL protocol.
5+
6+
**Does not** require TonAPI, TonCenter API, TonKeeper API or any other HTTP API.
57

68
[![NuGet](https://img.shields.io/nuget/v/TonLib.Net.svg?color=blue)](https://www.nuget.org/packages/TonLib.Net/) ![NuGet downloads](https://img.shields.io/nuget/dt/TonLib.NET?color=blue) ![Framework](https://img.shields.io/badge/framework-net6.0-blue) ![GitHub License](https://img.shields.io/github/license/justdmitry/TonLib.NET?color=blue)
79

810
⚠ Uses `System.Text.Json` package **v7.0.1** (from `net7.0`) - it makes [de]serialization much simpler (because of [Polymorphic serialization](https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/polymorphism)). It only updates `System.Text.Encodings.Web` (v6.0 -> v7.0) as a transitive dependency, which I think is acceptable.
911

12+
1013
## Features
1114

12-
* Read account balance and transaction history;
13-
* Operate with keys and mnemonics;
14-
* Send TON to different account;
15-
* Send arbitrary message to account;
16-
* Read and parse smartcontract data, call get-methods;
17-
* Read DNS data (resolve to ADNL);
18-
* Work with BOCs and Cells (read and parse using Slices, compose using CellBuilder);
15+
* Read account balance and transaction history [(sample)](/TonLibDotNet.Demo/Samples/AccountBalanceAndTransactions.cs);
16+
* Operate with keys and mnemonics [(sample)](/TonLibDotNet.Demo/Samples/KeysAndMnemonics.cs);
17+
* Send TON to different account [(sample)](/TonLibDotNet.Demo/Samples/SendTon.cs);
18+
* Work with BOCs and Cells (read and parse using Slices, compose using CellBuilder) [(sample)](/TonLibDotNet.Demo/Samples/BocAndCells.cs), including HashmapE [(tests)](/TonLibDotNet.Tests/Cells/DictTests.cs);
19+
* Read and parse smartcontract data, call get-methods [(sample)](/TonLibDotNet.Demo/Samples/ReadInfoFromSmartContracts.cs);
20+
* Resolve domains [(sample)](/TonLibDotNet.Demo/Samples/ResolveDomains.cs)
21+
* `TonRecipes` class (ready-to-use one-liners) to work with:
22+
* TEP-81 DNS contracts (parse all data, update entries) [(sample)](/TonLibDotNet.Demo/Samples/Recipes/RootDnsGetAllInfo.cs);
23+
* Telemint contracts (*.t.me usernames and +888 anonymous numbers) [(sample)](/TonLibDotNet.Demo/Samples/Recipes/TelemintGetAllInfo.cs)
24+
* TEP-74 Jettons (transfer, burn, read info) - *blocked by https://github.com/ton-blockchain/ton/issues/709*
25+
* TEP-62 NFTs - *soon*
1926

2027
And more:
2128

22-
* Easy-to-extend: describe and call new TonLib
29+
* Easy-to-extend:
30+
* Describe and call new TonLib methods without waiting for new version [(sample)](/TonLibDotNet.Demo/Samples/LibraryExtensibility.cs);
31+
* Add your own Recipe methods to existing repice classes without recompiling library;
2332
* Connects to random LiteServer or choosen by you;
2433
* Reconnects to different LiteServer if previous one fails (but you need to handle exceptions and implement retry logic yourself, for example with [Polly](http://www.thepollyproject.org/));
25-
* No 3rd-party packages;
34+
* No 3rd-party packages [except native .NET assemblies](#3rd-party-libraries-and-dependencies);
35+
2636

2737
## Usage
2838

@@ -48,14 +58,9 @@ await tonClient.InitIfNeeded();
4858
// Use 'Execute' to send requests.
4959
var lsi = await tonClient.Execute(new LiteServerGetInfo());
5060
logger.LogInformation("Server time: {Now}", lsi.Now);
51-
52-
var mi = await tonClient.Execute(new GetMasterchainInfo());
53-
logger.LogInformation("Last block: shard = {Shard}, seqno = {Seqno}", mi.Last.Shard, mi.Last.Seqno);
5461
```
5562

56-
And the result is:
57-
58-
![Sample](https://raw.githubusercontent.com/justdmitry/TonLib.NET/master/README_sample.png)
63+
Run [Demo project](/TonLibDotNet.Demo) for more samples.
5964

6065

6166
## Installing dependencies and running a demo
@@ -64,16 +69,22 @@ This library is a wrapper around `tonlibjson` library. You need to obtain compli
6469

6570
Go to https://github.com/ton-blockchain/ton/releases, open latest release, scroll to "Assets" and download `tonlibjson.*` for your OS. Make sure this file will be available for your running program (for example, add it to your project and set "Copy to Output Directory" to "Copy if newer").
6671

67-
The number of additional dependencies you need depends of what you already have on your machine.
72+
The number of additional dependencies you need depends of what you already have on your machine. On my Win machine I also needed `libcrypto-1_1-x64.dll` from OpenSSL v1.1. You may use [Process Monitor](https://learn.microsoft.com/en-us/sysinternals/downloads/procmon) to find what it wants if it fails to run.
73+
6874

69-
When something is missed, Demo app will fail with "Unable to load DLL 'tonlibjson' or one of its dependencies" exception. You may use [Process Monitor](https://learn.microsoft.com/en-us/sysinternals/downloads/procmon) to find what file it wants.
75+
## 3rd-party libraries and dependencies
76+
77+
* Microsoft.Extensions.Logging.Abstractions v6.0.0
78+
* Microsoft.Extensions.Options v6.0.0
79+
* System.Text.Json v7.0.1
80+
* System.Text.Encodings.Web v7.0.0 as transitive dependency
7081

71-
On my Win machine I needed `libcrypto-1_1-x64.dll` from OpenSSL.
7282

7383
## Donate
7484

7585
`EQDP_JFi4IucdPmEHJBSjEoSHlbC57G_8HLJAgqe05a-sGZ8`
7686

87+
7788
## Useful links
7889

7990
* TON ADNL API Home: https://ton.org/docs/develop/dapps/apis/adnl

0 commit comments

Comments
 (0)