Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(C#) Ton Client over Lite Client #407

Open
purpleguy99 opened this issue Dec 22, 2023 · 10 comments
Open

(C#) Ton Client over Lite Client #407

purpleguy99 opened this issue Dec 22, 2023 · 10 comments
Assignees
Labels
Approved This proposal is approved by the committee Developer Tool Related to tools or utilities used by developers

Comments

@purpleguy99
Copy link
Contributor

purpleguy99 commented Dec 22, 2023

Summary

The development of Ton Client on top of Lite Client is critical to the TON ecosystem as it provides a secure, efficient and reliable tool for retrieving data from Lite Servers. By building a Ton Client implementation on top of Lite Client, developers can easily retrieve important data straight from Lite Servers without having to use third party APIs.

Context

Ton Client over Lite Client is an essential tool for TON, which enables fast and efficient work with Lite Servers. Currently, there is only Ton Client over Toncenter api/v2 in our library, since until now there was no native implementation of a Lite Client. This proposal aims to create an TonClient implementation with all existing methods in TonSdk.Client via LiteClient, which will make it faster and easier for developers to retreive data from LiteServers, without any bounds.

Goals

Implement TonClient over LiteClient:

  • Stack (de) serialization with VM structures (TinyInt, Int, Cell, Slice, Builder, Tuple)
  • Main methods:
    • GetAddressInformation (Get basic information about the address: balance, code, data, last_transaction_id)
    • GetWalletInformation (Retrieve wallet information. This method parses contract state and currently supports more wallet types than getExtendedAddressInformation: simple wallet, standart wallet, v3 wallet, v4 wallet)
    • GetMasterchainInfo (Get up-to-date masterchain state)
    • GetBlockTransactions (Get transactions of the given block)
    • GetTransactions (Get transaction history of a given address)
    • RunGetMethod (Run get method on smart contract)
    • SendBoc (Send serialized boc file: fully packed and serialized external message to blockchain)
    • LookUpBlock (Look up block by either seqno, lt or unixtime)
    • EstimateFee (Estimate fees required for query processing. body, init-code and init-data accepted in serialized format (b64-encoded))
    • GetShards (Get shards information)
      Other methods will be implemented according to free access schema from TonSdk.Client
  • Dns methods:
    • GetWalletAddress
    • GetRootDnsAddress
  • Jetton methods:
    • GetData
    • GetTransactions
    • GetBalance
    • GetJettonWalletAddress
  • Nft methods:
    • GetItemAddress
    • GetRoyaltyParams
    • GetCollectionData
    • GetNftItemData
  • Wallet methods:
    • GetSeqno
    • GetSubwalletId

All the following methods will be implemented in a friendly use style under a single abstract class existing in TonSDK.Client for ease of use.

References

https://github.com/ton-blockchain/ton/blob/master/tl/generate/scheme/tonlib_api.tl#L326-L333

https://github.com/ton-blockchain/ton/blob/6897b5624566a2ab9126596d8bc4980dfbcaff2d/tonlib/tonlib/TonlibClient.cpp#L5411-L5443

Estimate suggested reward

1.600 USD in TON

@purpleguy99 purpleguy99 added the Developer Tool Related to tools or utilities used by developers label Dec 22, 2023
@delovoyhomie delovoyhomie added the Approved This proposal is approved by the committee label Dec 26, 2023
@delovoyhomie
Copy link
Collaborator

@purpleguy99, how is it going?

@purpleguy99
Copy link
Contributor Author

@purpleguy99, how is it going?

~80%, in progress, will done soon

@purpleguy99
Copy link
Contributor Author

Task completed.

Unified client for liteclient and http client here - https://github.com/continuation-team/TonSdk.NET/blob/main/TonSdk.Client/src/Client/TonClient.cs
Tests for the client methods here - https://github.com/continuation-team/TonSdk.NET/blob/main/TonSdk.Client/test/Client.test.cs

Wallet for rewards - UQDHtMV5SG45AwIip7cnmVTvbDz4T8s-nSBtWGl9H0E58trC

@purpleguy99
Copy link
Contributor Author

Any updates? @delovoyhomie

@purpleguy99
Copy link
Contributor Author

Any updates?

@purpleguy99
Copy link
Contributor Author

@thekiba any updates?

@Urryy
Copy link

Urryy commented May 30, 2024

Where can i get apikey, fron ton console?

@Urryy
Copy link

Urryy commented May 30, 2024

image

There is such an error, although I took the key in the bot and everything seems to be correct.

@purpleguy99
Copy link
Contributor Author

image

There is such an error, although I took the key in the bot and everything seems to be correct.

this questions not related to this footstep and issue. If you have questions according to SDK, visit our tg dev channel or docs.

@purpleguy99
Copy link
Contributor Author

Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved This proposal is approved by the committee Developer Tool Related to tools or utilities used by developers
Projects
None yet
Development

No branches or pull requests

3 participants