Skip to content

Releases: tonkeeper/pytonapi

v0.1.7

09 Jan 10:46
Compare
Choose a tag to compare

What's Changed

New Features

  • Added support for Python 3.11 and 3.12.

Dependency Updates

  • Removed libscrc library.
  • Updated httpx version to 0.26.0.

Bug Fixes

  • Fixed an issue in the v2/blockchain/accounts/{account_id}/methods/{method_name} method.

Refactoring

  • Minor code refactoring for improved maintainability.

This release introduces new Python version support, updates dependencies, addresses a specific issue, and includes minor refactoring for better code organization.

v0.1.6

26 Nov 22:07
Compare
Choose a tag to compare

What's Added

  • New Features and API Methods

    • Added support for all available methods. See the full list here.
  • Streaming API Enhancements

    • Introduced Server-Sent Events (SSE) for enhanced streaming capabilities.
    • Enabled Websockets support (Async version only) to provide real-time communication.
  • Library and Dependency Updates

    • Replaced aiohttp and requests with httpx for improved HTTP client functionality.
    • Added websockets for enhanced interaction and communication.
  • Examples and Usage Illustrations

    • Added a folder with usage examples: Examples.
    • Check out the SSE usage example: sse.py.
    • More examples will be added to provide comprehensive guidance.

Changes Made

  • Updated the API to include all available methods.
  • Implemented Server-Sent Events (SSE) for improved streaming capabilities.
  • Introduced Websockets support, available exclusively in the Async version.
  • Replaced the usage of aiohttp and requests with httpx for improved HTTP client functionality.

v0.1.3

30 Oct 01:10
Compare
Choose a tag to compare

What's Changed

  • Address Update: EQ » UQ

Change Details

By the end of this year, the TON network will transition to a new wallet address format. Instead of the familiar EQ prefix, addresses will now start with UQ. This update changes how user addresses are displayed in the TON network, making addressing more user-friendly and intuitive.

Changes Made

  • Updated the raw_to_userfriendly function to support the new address format.
  • Added the is_bounceable parameter to enable the display of UQ addresses.

Address Examples

  • Old Address:
    EQC-3ilVr-W0Uc3pLrGJElwSaFxvhXXfkiQA3EwdVBHNNess
  • New Address:
    UQC-3ilVr-W0Uc3pLrGJElwSaFxvhXXfkiQA3EwdVBHNNbbp

v0.1.1

10 Sep 08:04
Compare
Choose a tag to compare

What's Changed

  • Fixed method parameters from start_data and end_data to start_date and end_date.

v0.1.0

08 Sep 03:55
Compare
Choose a tag to compare

What's Changed

Updated requirements packages:

  • Updated pydantic to version 2.* but still uses version 1 from pydantic.v1.
  • Updated aiohttp to version >=3.8.5.
  • Updated requests to version >=2.31.0.

Added limit exceeding processing:

The Tonapi now returns a 429 response with a rate limit error when limits are exceeded.
To deal with this, it was added:

  • TONAPITooManyRequestsError - raised if the limit is exceeded.
  • max_retries - parameter for Tonapi and AsyncTonapi (default 3), For repeated requests in case of exceeding the rate limit.
    If all retries fail, a TONAPITooManyRequestsError exception is thrown.

Added methods:

Accounts

  • get_jettons_history (passed!) - "/v2/accounts/{account_id}/jettons/history"
  • get_jettons_history_by_jetton (passed!) - "/v2/accounts/{account_id}/jettons/{jetton_id}/history"
  • get_event (passed!) - "/v2/accounts/{account_id}/events/{event_id}"
  • get_events (passed!) - "/v2/accounts/{account_id}/events"
  • get_nft_history (passed!) - "v2/accounts/{account_id}/nfts/history"
  • search_by_domain (passed!) - "/v2/accounts/search"
  • get_subscriptions (passed!) - "/v2/accounts/{account_id}/subscriptions"
  • get_expiring_dns (passed!) - "/v2/accounts/{account_id}/dns/expiring"
  • get_public_key (passed!) - "/v2/accounts/{account_id}/publickey"
  • get_balance_change (passed!) - "/v2/accounts/{account_id}/diff"
  • reindex (passed!) - "/v2/accounts/{account_id}/reindex"

Blockchain

  • get_transaction_by_message (passed!) - "/v2/blockchain/messages/{msg_id}/transaction"
  • get_validators (not implemented) - "/v2/blockchain/validators"
  • get_last_masterchain_block (passed!) - "/v2/blockchain/masterchain-head"
  • get_account_info (passed!) - "/v2/blockchain/accounts/{account_id}"
  • inspect_account (passed!) - "/v2/blockchain/accounts/{account_id}/inspect"
  • execute_get_method (passed!) - "/v2/blockchain/accounts/{account_id}/methods/{method_name}"

DNS

  • get_info (passed!) - "/v2/dns/{domain_name}"
  • get_auctions (passed!) - "/v2/dns/auctions"

Events

  • get_event (passed!) - "/v2/events/{event_id}"

NFT

  • get_nft_history (passed!) - "v2/nfts/{account_id}/history"

Rates

  • get_chart (passed!) - "/v2/rates/chart"

Staking

  • get_pool_info (passed!) - "/v2/staking/pool/{account_id}"
  • get_pool_history (passed!) - "/v2/staking/pool/{account_id}/history"
  • get_participating_pools (passed!) - "/v2/staking/nominator/{account_id}/pools"
  • get_all_network_pools (passed!) - "/v2/staking/pools"

Storage

  • get_providers (passed!) - "/v2/storage/providers"

Updated schemas:

  • Collection - added optional description field
  • NftCollection - added optional previews field