mirror of
https://github.com/bohd4nx/FragmentAPI.git
synced 2026-07-25 06:14:29 +00:00
Refactor for GRAM (ex TON) integration
- Updated imports and references from TON to GRAM across multiple modules. - Renamed functions and variables to reflect the change from TON to GRAM. - Adjusted validation checks for top-up and recharge amounts to use GRAM limits. - Modified error messages and exceptions to indicate GRAM instead of TON. - Updated tests to ensure they reflect the new GRAM terminology and functionality. - Introduced new constants for GRAM-related configurations.
This commit is contained in:
@@ -24,6 +24,34 @@ and this project uses [Calendar Versioning](https://calver.org/) (`YYYY.MINOR.MI
|
||||
- Updated `DEVICE_INFO` fingerprint: Tonkeeper `appVersion` -> `26.05.0`.
|
||||
- Updated client docstrings and purchase examples to document all supported payment methods.
|
||||
|
||||
### Renamed — TON -> GRAM (ex TON)
|
||||
|
||||
The TON blockchain has been rebranded to **GRAM (ex TON)**. All identifiers, messages, and documentation have been updated accordingly.
|
||||
|
||||
**Public API**
|
||||
|
||||
- `FragmentClient.topup_ton()` → `topup_gram()`
|
||||
- `PaymentMethod.TON` → `PaymentMethod.GRAM`
|
||||
- `PaymentMethod.USDT_TON` → `PaymentMethod.USDT_GRAM`
|
||||
- `WalletInfo.ton_balance` → `WalletInfo.gram_balance`
|
||||
|
||||
**Constants**
|
||||
|
||||
- `TON_TOPUP_MIN` / `TON_TOPUP_MAX` → `GRAM_TOPUP_MIN` / `GRAM_TOPUP_MAX`
|
||||
- `MIN_TON_BALANCE` → `MIN_GRAM_BALANCE`
|
||||
- `USDT_TON_MASTER_ADDRESS` → `USDT_GRAM_MASTER_ADDRESS`
|
||||
|
||||
**Exceptions**
|
||||
|
||||
- `ConfigurationError.INVALID_TON_AMOUNT` → `INVALID_GRAM_AMOUNT`
|
||||
- `WalletError.LOW_TON_BALANCE` → `LOW_GRAM_BALANCE`
|
||||
- `WalletError.TON_BALANCE_CHECK_FAILED` → `GRAM_BALANCE_CHECK_FAILED`
|
||||
|
||||
**Internals**
|
||||
|
||||
- `pyfragment/core/constants/ton.py` → `gram.py`
|
||||
- `check_ton_payment_balance()` → `check_gram_payment_balance()`
|
||||
|
||||
---
|
||||
|
||||
## [2026.3.1] — 2026-05-29
|
||||
@@ -239,6 +267,8 @@ and this project uses [Calendar Versioning](https://calver.org/) (`YYYY.MINOR.MI
|
||||
- `py.typed` marker — full PEP 561 typing support for type-checkers
|
||||
- `__repr__` on all result types for readable debug output
|
||||
|
||||
[2026.3.2]: https://github.com/bohd4nx/pyfragment/releases/tag/v2026.3.2
|
||||
[2026.3.1]: https://github.com/bohd4nx/pyfragment/releases/tag/v2026.3.1
|
||||
[2026.3.0]: https://github.com/bohd4nx/pyfragment/releases/tag/v2026.3.0
|
||||
[2026.2.3]: https://github.com/bohd4nx/pyfragment/releases/tag/v2026.2.3
|
||||
[2026.2.2]: https://github.com/bohd4nx/pyfragment/releases/tag/v2026.2.2
|
||||
|
||||
Reference in New Issue
Block a user