mirror of
https://github.com/bohd4nx/FragmentAPI.git
synced 2026-07-25 06:14:29 +00:00
01a5befd87
- 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.
67 lines
1.8 KiB
Python
67 lines
1.8 KiB
Python
from importlib.metadata import version
|
|
|
|
from pyfragment.client import FragmentClient
|
|
from pyfragment.core.cookies import get_cookies_from_browser
|
|
from pyfragment.exceptions import (
|
|
AnonymousNumberError,
|
|
ClientError,
|
|
ConfigurationError,
|
|
CookieError,
|
|
FragmentAPIError,
|
|
FragmentError,
|
|
FragmentPageError,
|
|
OperationError,
|
|
ParseError,
|
|
TransactionError,
|
|
UnexpectedError,
|
|
UserNotFoundError,
|
|
VerificationError,
|
|
WalletError,
|
|
)
|
|
from pyfragment.models.anonymous_numbers import LoginCodeResult, TerminateSessionsResult
|
|
from pyfragment.models.cookies import CookieResult
|
|
from pyfragment.models.enums import PaymentMethod
|
|
from pyfragment.models.giveaways import PremiumGiveawayResult, StarsGiveawayResult
|
|
from pyfragment.models.marketplace import GiftsResult, NumbersResult, UsernamesResult
|
|
from pyfragment.models.payments import AdsRechargeResult, AdsTopupResult, PremiumResult, StarsResult
|
|
from pyfragment.models.wallet import WalletInfo
|
|
|
|
__version__: str = version("pyfragment")
|
|
|
|
__all__ = [
|
|
"__version__",
|
|
"FragmentClient",
|
|
# results
|
|
"StarsResult",
|
|
"StarsGiveawayResult",
|
|
"PremiumResult",
|
|
"PremiumGiveawayResult",
|
|
"WalletInfo",
|
|
"AdsTopupResult",
|
|
"AdsRechargeResult",
|
|
"CookieResult",
|
|
"GiftsResult",
|
|
"LoginCodeResult",
|
|
"NumbersResult",
|
|
"TerminateSessionsResult",
|
|
"UsernamesResult",
|
|
# exceptions
|
|
"FragmentError",
|
|
"FragmentAPIError",
|
|
"FragmentPageError",
|
|
"ConfigurationError",
|
|
"UserNotFoundError",
|
|
"WalletError",
|
|
"VerificationError",
|
|
"TransactionError",
|
|
"AnonymousNumberError",
|
|
"ClientError",
|
|
"CookieError",
|
|
"OperationError",
|
|
"ParseError",
|
|
"UnexpectedError",
|
|
# literal types
|
|
"PaymentMethod",
|
|
"get_cookies_from_browser",
|
|
]
|