Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Add support for extra TonCenter API endpoints and utility methods#26

Open
B14ckP4nd4 wants to merge 1 commit intoyungwine:masterfrom
B14ckP4nd4:master
Open

Add support for extra TonCenter API endpoints and utility methods#26
B14ckP4nd4 wants to merge 1 commit intoyungwine:masterfrom
B14ckP4nd4:master

Conversation

@B14ckP4nd4
Copy link

This pull request adds new methods to the TonCenterClient service provider to support additional API endpoints from the TON Network that are not currently available in the original repository. The following methods have been added:

get_address_information: Fetches general information about a given address.
get_wallet_information: Retrieves wallet-specific details for a given address.
get_extended_address_information: Provides extended information for a given address.

Additionally, two utility methods have been added to handle TON amount conversions:

from_nanotons(amount): Converts an amount from nanotons to tons.
to_nanotons(amount): Converts an amount from tons to nanotons.

These enhancements extend the functionality of the TonCenterClient, enabling developers to interact with more endpoints in the TonCenter API and simplifying TON-related calculations.

- Added support for the following TonCenter API methods in `TonCenterClient`:
  - `get_address_information`: Fetches general information about a given address.
  - `get_wallet_information`: Retrieves wallet-specific details for a given address.
  - `get_extended_address_information`: Provides extended information for a given address.

- Added utility functions:
  - `from_nanotons(amount)`: Converts nanotons to tons.
  - `to_nanotons(amount)`: Converts tons to nanotons.

These changes extend the capability to work with more endpoints and improve TON amount conversions.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant