Commit Graph

17 Commits

Author SHA1 Message Date
bohd4nx fd31342d03 Refactor: Replace httpx with curl-cffi for HTTP requests and update dependencies 2026-07-05 16:13:16 +03:00
bohd4nx 228fbfcd1c Refactor tonapi module: Move account and transaction logic to services
- Moved account-related functions and classes from `pyfragment.domains.tonapi.account` to `pyfragment.services.tonapi.account`.
- Moved transaction-related functions and classes from `pyfragment.domains.tonapi.transaction` to `pyfragment.services.tonapi.transaction`.
- Updated imports across the codebase to reflect the new structure.
- Removed unused `tonapi` module files and cleaned up related code.
- Introduced `ApiProvider` enum to manage API provider types.
- Added validation functions for cookies and wallet versions in a new `validation.py` module.
2026-06-16 01:37:26 +03:00
bohd4nx dc9661134d Refactor cookie handling and service structure
- Removed the old CookieResult model from pyfragment.core.models and created a new one in pyfragment.services.cookies.models.
- Implemented get_cookies_from_browser function in pyfragment.services.cookies.service to extract cookies directly from supported browsers.
- Updated imports across various modules to reflect the new structure and removed unused imports.
- Cleaned up models in ads, anonymous_numbers, giveaways, marketplace, and purchases domains by removing unnecessary __all__ declarations.
- Added new example scripts for cookie extraction and various purchase functionalities.
- Consolidated constants into a new pyfragment.core.constants module for better organization.
2026-06-16 01:19:33 +03:00
bohd4nx 9f11ccb3ee Refactor pyfragment structure: Move models to domain-specific modules
- Moved PaymentMethod and other enums from models to enums.py for better organization.
- Refactored imports in various files to reflect the new structure.
- Created new model files for ads, anonymous numbers, giveaways, marketplace, purchases, and tonapi.
- Removed the old models.py file to clean up the codebase.
- Updated all relevant imports in the codebase to use the new model locations.
2026-06-16 01:02:28 +03:00
bohd4nx 8f865f4911 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.
2026-06-16 00:47:49 +03:00
bohd4nx b85b34f2b1 feat: update changelog for new payment methods; add UserNotFoundError handling in purchase flows 2026-05-30 00:17:06 +03:00
bohd4nx 695430744a feat: update payment method options and validation across purchase and giveaway examples; add AlreadySubscribedError exception handling 2026-05-29 23:14:59 +03:00
bohd4nx ed54d1f1a0 feat: enhance FragmentClient to support custom headers; update limits for TON topup and stars purchases 2026-05-29 22:51:27 +03:00
bohd4nx 6aa7037380 feat: update payment method defaults to use PaymentMethod enum; refactor related validation checks 2026-05-29 22:31:30 +03:00
bohd4nx 5124af17ef feat: reorganize constants into separate modules; update validation logic for mnemonic and API key lengths 2026-05-29 22:22:09 +03:00
bohd4nx 66bcd22198 feat: update constants and validation for stars and payment methods; refactor enums for clarity 2026-05-29 22:11:03 +03:00
bohd4nx f8ad801e0c feat: enhance documentation with contributing guidelines and security policy
refactor: update README configuration parameters and add error handling section
refactor: streamline tonapi imports and add WalletVersion to __all__
chore: update project metadata in pyproject.toml
2026-05-29 01:27:29 +03:00
bohd4nx 6cb6e3fe05 refactor: remove unused transfer functions and streamline imports in wallet and models 2026-05-29 01:17:57 +03:00
bohd4nx 546bcb337c feat: implement logging throughout the application and enhance error handling 2026-05-29 01:04:51 +03:00
bohd4nx 2a6c5ef1f9 refactor: reorganize tonapi module and update imports for account management 2026-05-20 23:45:27 +03:00
bohd4nx 01a5befd87 Refactor wallet transaction handling and introduce tonapi module
- Removed wallet transaction and transfer logic from the wallet domain.
- Introduced a new tonapi module to handle transactions and balance checks.
- Updated tests to reflect the new structure and ensure functionality remains intact.
- Added functionality for sending TON and USDT transfers through the tonapi module.
- Improved error handling and validation for payment balances.
- Cleaned up and organized imports across the codebase.
2026-05-20 23:42:24 +03:00
bohd4nx ae164d4fe7 feat: Implement marketplace and purchases services
- Added MarketplaceService for searching usernames, numbers, and gifts.
- Introduced PurchasesService for purchasing stars and premium subscriptions.
- Created WalletService for wallet operations including balance checks and top-ups.
- Developed transaction handling for TON and USDT transfers.
- Added models for payments, marketplace results, and wallet information.
- Implemented error handling for various operations including wallet and transaction errors.
- Established domain structure for purchases, marketplace, and wallet functionalities.
2026-05-20 23:33:01 +03:00