diff --git a/pyproject.toml b/pyproject.toml index dfd2fca..48d5fa6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "solathon" -version = "0.1.7" +version = "0.1.8" description = "High performance, easy to use and feature-rich Solana SDK for Python." license = "MIT" authors = ["GitBolt"] diff --git a/solathon/__init__.py b/solathon/__init__.py index 8531273..6046952 100644 --- a/solathon/__init__.py +++ b/solathon/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.1.7" +__version__ = "0.1.8" from .client import Client from .async_client import AsyncClient diff --git a/solathon/client.py b/solathon/client.py index d94d5a2..833bc3d 100644 --- a/solathon/client.py +++ b/solathon/client.py @@ -543,8 +543,10 @@ def get_token_accounts_by_owner( [ str(public_key), {"mint": mint_id} if mint_id else {"programId": program_id}, - {"encoding": encoding}, - commitment + { + "encoding": encoding, + "commitment": commitment + }, ], ) if self.clean_response: diff --git a/solathon/core/types/account_info.py b/solathon/core/types/account_info.py index d42fefe..fc651ba 100644 --- a/solathon/core/types/account_info.py +++ b/solathon/core/types/account_info.py @@ -11,6 +11,9 @@ class AccountInfoType(TypedDict): size: Union[int, None] data: Union[str, dict[str, Any]] + def __repr__(self) -> str: + return f"AccountInfoType(owner={self.owner!r})" + class AccountInfo(): ''' Convert Account Information JSON to Class @@ -23,6 +26,9 @@ def __init__(self, result: AccountInfoType) -> None: self.size = result.get('size', None) self.data = result['data'] + def __repr__(self) -> str: + return f"AccountInfo(owner={self.owner!r})" + class ProgramAccountType(TypedDict): ''' JSON Response type of Program Account Information received by RPC @@ -37,3 +43,6 @@ class ProgramAccount: def __init__(self, result: ProgramAccountType) -> None: self.pubkey = result['pubkey'] self.account = AccountInfo(result['account']) + + def __repr__(self) -> str: + return f"ProgramAccount(pubkey={self.pubkey!r})" \ No newline at end of file