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

TONAPI library for Python #375

Closed
89 tasks done
nessshon opened this issue Nov 21, 2023 · 4 comments
Closed
89 tasks done

TONAPI library for Python #375

nessshon opened this issue Nov 21, 2023 · 4 comments
Assignees
Labels
Approved This proposal is approved by the committee Developer Tool Related to tools or utilities used by developers

Comments

@nessshon
Copy link
Contributor

nessshon commented Nov 21, 2023

Summary

A Python library for Tonapi, offering comprehensive type descriptions.

Context

This library allows users to use different versions of Tonapi, supporting both testnet and mainnet. The Tonapi library is structured to improve usability. When creating an instance of the class, users can specify the network and token. The library carefully documents Tonapi methods, organizing them into
intuitive subclasses.

Library Features

  • Asynchronous and synchronous function calls.
  • Data validation using Pydantic, providing helpful insights.
  • Raw and Streaming API support.

The library, hosted on GitHub, has been making remarkable progress. Almost all popular methods have been implemented, with just a few remaining for completion. The library is poised to offer the complete set of Tonapi features.

The creators of Tonapi have officially recognized and endorsed this library. It is now affiliated with Tonapi and linked on the TonKeeper GitHub page, solidifying its integration with the Tonapi ecosystem.

Tonapi methods marked with a checkmark are already described and organized into subclasses:

UPD:
Done! All methods have been added.

Streaming API

  • SSE

  • v2/sse/accounts/transactions?accounts={accounts}

  • v2/sse/accounts/traces?accounts={accounts}

  • v2/sse/mempool?accounts={accounts}

  • Websocket

  • v2/websocket/subscribe_account

  • v2/websocket/subscribe_trace

  • v2/websocket/subscribe_mempool

Raw API

  • Blockchain

  • /v2/blockchain/blocks/{block_id}

  • /v2/blockchain/masterchain/{masterchain_seqno}/shards

  • /v2/blockchain/blocks/{block_id}/transactions

  • /v2/blockchain/blocks/{block_id}/config/raw

  • /v2/blockchain/transactions/{transaction_id}

  • /v2/blockchain/messages/{msg_id}/transaction

  • /v2/blockchain/validators

  • /v2/blockchain/masterchain-head

  • /v2/blockchain/accounts/{account_id}

  • /v2/blockchain/accounts/{account_id}/transactions

  • /v2/blockchain/accounts/{account_id}/methods/{method_name}

  • /v2/blockchain/message

  • /v2/blockchain/config

  • /v2/blockchain/config/raw

  • /v2/blockchain/accounts/{account_id}/inspect

  • Accounts

  • /v2/address/{account_id}/parse

  • /v2/accounts/_bulk

  • /v2/accounts/{account_id}

  • /v2/accounts/{account_id}/dns/backresolve

  • /v2/accounts/{account_id}/jettons

  • /v2/accounts/{account_id}/jettons/history

  • /v2/accounts/{account_id}/jettons/{jetton_id}/history

  • /v2/accounts/{account_id}/nfts

  • /v2/accounts/{account_id}/nfts/history

  • /v2/accounts/{account_id}/events

  • /v2/accounts/{account_id}/events/{event_id}

  • /v2/accounts/{account_id}/traces

  • /v2/accounts/{account_id}/subscriptions

  • /v2/accounts/{account_id}/reindex

  • /v2/accounts/search

  • /v2/accounts/{account_id}/dns/expiring

  • /v2/accounts/{account_id}/publickey

  • /v2/accounts/{account_id}/diff

  • Emulation

  • /v2/events/emulate

  • /v2/traces/emulate

  • /v2/wallet/emulate

  • /v2/accounts/{account_id}/events/emulate

  • NFT

  • /v2/accounts/{account_id}/nfts/history

  • /v2/nfts/collections

  • /v2/nfts/collections/{account_id}

  • /v2/nfts/collections/{account_id}/items

  • /v2/nfts/_bulk

  • /v2/nfts/{account_id}

  • /v2/nfts/{account_id}/history

  • DNS

  • /v2/dns/{domain_name}

  • /v2/nfts/{account_id}/history

  • /v2/dns/{domain_name}/resolve

  • /v2/dns/{domain_name}/bids

  • /v2/dns/auctions

  • Traces

  • /v2/traces/{trace_id}

  • Events

  • /v2/events/{event_id}

  • Jettons

  • /v2/jettons

  • /v2/jettons/{account_id}

  • /v2/jettons/{account_id}/holders

  • /v2/events/{event_id}/jettons

  • Staking

  • /v2/staking/nominator/{account_id}/pools

  • /v2/staking/pool/{account_id}

  • /v2/staking/pool/{account_id}/history

  • /v2/staking/pools

  • Storage

  • /v2/storage/providers

  • Rates

  • /v2/rates

  • /v2/rates/chart

  • Connect

  • /v2/tonconnect/payload

  • /v2/tonconnect/stateinit

  • Wallet

  • /v2/wallet/backup

  • /v2/wallet/auth/proof

  • /v2/pubkeys/{public_key}/wallets

  • /v2/wallet/{account_id}/seqno

  • Lite Server

  • /v2/liteserver/get_masterchain_info

  • /v2/liteserver/get_masterchain_info_ext

  • /v2/liteserver/get_time

  • /v2/liteserver/get_block/{block_id}

  • /v2/liteserver/get_state/{block_id}

  • /v2/liteserver/get_block_header/{block_id}

  • /v2/liteserver/send_message

  • /v2/liteserver/get_account_state/{account_id}

  • /v2/liteserver/get_shard_info/{block_id}

  • /v2/liteserver/get_all_shards_info/{block_id}

  • /v2/liteserver/get_transactions/{account_id}

  • /v2/liteserver/list_block_transactions/{block_id}

  • /v2/liteserver/get_block_proof

  • /v2/liteserver/get_config_all/{block_id}

  • /v2/liteserver/get_shard_block_proof/{block_id}

References

tonapi.io

Estimate suggested reward

  • Standard TON Footstep NFT
  • 500 USD in TON
@nessshon nessshon added the Developer Tool Related to tools or utilities used by developers label Nov 21, 2023
@nessshon nessshon changed the title TonApi library for Python TONAPI library for Python Nov 23, 2023
@delovoyhomie delovoyhomie added the Approved This proposal is approved by the committee label Dec 13, 2023
@delovoyhomie
Copy link
Collaborator

@nessshon, thank you for your wonderful bounty!
What kind of reward will be pleasant for you?

@nessshon
Copy link
Contributor Author

nessshon commented Dec 13, 2023

@delovoyhomie , thank you for approving my work.

I saw a similar task on TypeScript, it was estimated at $500. However, I will appreciate your rating, even if it is a little lower or higher.

@mbaneshi
Copy link
Contributor

I do not know if my word is heard or not.

This work is huge, it takes 7 months, more than 5.1k lines of code, and 94 files.
It was well-written and has test coverage, documents, and packaging.

Maybe @nessshon offered it due to humility or the organizational task nature behind it, but I saw other similar projects around 3-5k.
Anyway, @delovoyhomie my thought is under 2k equivalent in TON is unfair.

please look at below statistics :

Screen Shot 2023-12-17 at 13 59 49

delovoyhomie added a commit that referenced this issue Feb 1, 2024
@delovoyhomie
Copy link
Collaborator

Rewards sent! Thank you for the contribution.

Qustbook proposal

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