Skip to content

Releases: justdmitry/TonLib.NET

v0.22

05 Aug 11:14
v0.22.0
Compare
Choose a tag to compare

New features and fixes:

  • Additional overloads for SmcRunGetMethod for less boilerplate code;
  • Drop support unsupported anymore net7, update System.Text.Json to 8.0.4;
  • StoreAddressIntStd now accepts nulls and empty strings (and writes two zero bits);
  • New CreateTransferCell and CreateBurnCell methods in Tep74Jettons recipe (to create cells instead of messages);
  • New TryParseJettonTransferNotification in Tep74Jettons recipe to work with incoming jetton transfers;
  • Remove obsolete ISerializable support from TonClientException;
  • Add CancellationTokens to ITonClient params (fix #8).

v0.21.3: Deep Tx parsing and other useful helpers

30 Mar 15:03
v0.21.3
Compare
Choose a tag to compare

Transaction data can be parsed now (according to block.tlb) to obtain some "internal" fields from phases, like fees or success flag(s). See TransactionTests.cs for more details;

Improvements to existing classes:

  • Boc: new ParseFromHex and TryParseFromHex (in addition to ...FromBase64);
  • Slice: LoadAndParseDict, TryLoadAndParseDict and ParseDict now accept optional IEqualityComparer<TKey>;
  • Slice: new SkipRef so you don't need to read it to temporary variable;
  • Slice/Cell: new ParseDictRef, LoadAndParseDictRef and TryLoadAndParseDictRef to work with Cell-as-value dicts;
  • AddressUtils: new TrySetBounceable to validate address string and convert it to required bounceable mode in one call;
  • ITonClient: new SyncStateCurrentSeqno property return current (synced to) masterchain height;
  • ITonClient: new Deinit method to "forget" LiteServer currently connected to, and initiate new connection on next InitIfNeeded - for example if you detect that current LiteServer is not synced;
  • TonOptions: new ConfigPathLocalTestnet and ConfigPathLocalMainnet properties, so you can use locally saved config instead of downloading it every time;

v0.20: A lot of new stuff

27 Nov 20:36
v0.20.0
Compare
Choose a tag to compare
  • New TonRecipes.NFTs added to work with TEP-62 NFTs: GetCollectionData, GetNftAddressByIndex, GetNftData, GetNftContent, CreateTransferMessage;
  • New extension methods ToBoc() for StackEntry, StackEntryCell, StackEntrySlice, Cell and Slice, so you can write shorter code with less ToTvmCell() and similar chained conversions;
  • New extension methods ToInt(), ToLong(), ToBigInteger() and ToBigIntegerBytes() for StackEntry, so you can write result.Stack[0].ToInt() instead of int.Parse(result.Stack[0].ToTvmNumberDecimal(), CultureInfo.InvariantCulture);
  • Additional constructors for types that expect List<ofSomething>: now they also accepts arrays with params modifier;
  • New TonUtils.KeyUtils to work with keys, particularly ParseEd25519PublicKey to convert public key from internal tonlib representation to bytes;
  • New requests: GetConfigAll and GetConfigParam to get blockchain configuration data;
  • Additional Slice numeric methods: PreloadUShort, PreloadShort, PreloadUInt, PreloadInt, PreloadULong, PreloadLong;
  • Additional Slice and CellBuilder string methods: LoadString and StoreString (as utf-8 bytes);
  • Additional Slice and CellBuilder long-string methods: LoadStringSnake and StoreStringSnake, LoadStringChunked and StoreStringChunked;
  • Support for wallet-v4: V4AccountState and V4InitialAccountState;
  • New framework net8.0 added to list of target frameworks

v0.19: TonRecipes for Jettons

08 Jul 18:29
v0.19.0
Compare
Choose a tag to compare
  • Use TonRecipes.Jettons to transfer or burn jettons, to get general Jetton data or JettonWallet data
    But wait for resolution of ton-blockchain/ton#709 first!
  • Framework net7.0 added (now supports both net6.0 and net7.0)

v0.18: TonRecipes for anonymous numbers

06 Jun 15:24
v0.18.0
Compare
Choose a tag to compare

TonRecipes.Telemint replaced with two: TonRecipes.TelegramUsernames (for *.t.me names) and TonRecipes.TelegramNumbers (for +888 anonymous numbers).

v0.17: TonRecipes

01 Jun 13:26
v0.17.0
Compare
Choose a tag to compare

New TonRecipes static class with read-to-use one-liners, e.g.:

  • TonRecipes.RootDns.GetNftAddress to get DNS NFT Contract address from something.ton domain name;
  • TonRecipes.RootDns.GetOwner to get owner of DNS NFT by it's address;
  • TonRecipes.RootDns.GetAllInfo to load all information from DNS NFT smartcontract data and parse to separate ready-to-use fields;
  • Other RootDns methods;
  • Similar TonRecipes.Telemint class to work with *.t.me NFTs;

v0.16: TonUtils

18 May 16:02
v0.16.0
Compare
Choose a tag to compare

Static TonUtils class with useful functions:

  • Address.IsValid (string address, out byte workchainId, out bool bounceable, out bool testnetOnly)
  • Address.SetBounceable (string address, bool bounceable)
  • Coins.FromNano (long nano)
  • Coins.ToNano (decimal ton)
  • Text.EncodeAsBase64 (string? source)
  • Text.TryDecodeBase64 (string? source, out string? result)
  • Adnl.Encode (ReadOnlySpan<byte> adnl)
  • Adnl.Decode (string adnl)

More helpers may be added in future releases.

v0.15: HashmapE / Dictionary

03 May 11:45
v0.15.0
Compare
Choose a tag to compare

Now you can read/write dictionaries (HashmapE) from/to cells:

  • Use LoadDict and TryLoadDict to load Cell with dict data (or something that has been stored as dict data) from Slice, then call ParseDict to load actual dict data from that Cell.
  • Use LoadAndParseDict, TryLoadAndParseDict to load and immediately parse dictionary.
  • Use StoreDict overloads to store Cell with serialized dict data or serialize-and-store dict.

Check DictTests.cs for some samples.

v0.14: CellBuilder changes and useful extensions

21 Apr 10:31
v0.14.0
Compare
Choose a tag to compare
  1. CellBuilder changed in storing coins:
    • StoreGrams and LoadGrams removed
    • Added LoadCoins (to long), LoadCoinsToULong and LoadCoinsToBigInt
    • Several StoreCoins added (accept long, ulong and BigInteger)

By default, you can safely work with TON (nanoTON) in Int64 (long) - check https://t.me/tondev/122940 for details. ULong and BigInteger were added for advanced scenarios.

  1. Some syntactic sugar extensions were added for easier reading TVM data (for parsing SmcRunGetMethod responses for example):
    now you can write
    var boc = runResult.Stack[0].ToTvmCell().ToBoc();
    instead of
    Boc.TryParseFromBase64(((StackEntryCell)runResult.Stack[0]).Cell.Bytes, out var boc)

v0.13: Cells & BOCs

16 Apr 12:21
v0.13.0
Compare
Choose a tag to compare

New in v0.13:

  • BOC to parse Cells from TON Blockchain and to serialize Cells to send;
  • Convert Cell to Slice and read data from cells;
  • Use CellBuilder to fill Cell with your data;

Minor updates:

  • tonlibjson library names were updated to match v2023.04 release
  • Demo project restructures for easier understanding