INNER CODE UNIT · Python
_get_balance_body
michaelhly/solana-py · src/solana/rpc/core.py:170
def _get_balance_body(self, pubkey: Pubkey, commitment: Commitment | None) -> GetBalance:
commitment_to_use = _COMMITMENT_TO_SOLDERS[commitment or self._commitment]
return GetBalance(pubkey, RpcContextConfig(commitment=commitment_to_use))
def _get_account_info_body(
self,
pubkey: Pubkey,
commitment: Commitment | None,
encoding: str,
data_slice: DataSliceOpts | None,
) -> GetAccountInfo:
data_slice_to_use = (
None if data_slice is None else UiDataSliceConfig(offset=data_slice.offset, length=data_slice.length)
)
encoding_to_use = _ACCOUNT_ENCODING_TO_SOLDERS[encoding]
commitment_to_use = _COMMITMENT_TO_SOLDERS[commitment or self._commitment]
config = RpcAccountInfoConfig(
encoding=encoding_to_use,