INNER CODE UNIT · Python
_get_latest_blockhash_body
michaelhly/solana-py · src/solana/rpc/core.py:344
def _get_latest_blockhash_body(self, commitment: Commitment | None) -> GetLatestBlockhash:
commitment_to_use = _COMMITMENT_TO_SOLDERS[commitment or self._commitment]
return GetLatestBlockhash(RpcContextConfig(commitment_to_use))
@staticmethod
def _get_signature_statuses_body(
signatures: list[Signature], search_transaction_history: bool
) -> GetSignatureStatuses:
config = RpcSignatureStatusConfig(search_transaction_history)
return GetSignatureStatuses(signatures, config)
def _get_slot_body(self, commitment: Commitment | None) -> GetSlot:
commitment_to_use = _COMMITMENT_TO_SOLDERS[commitment or self._commitment]
return GetSlot(RpcContextConfig(commitment_to_use))
def _get_slot_leader_body(self, commitment: Commitment | None) -> GetSlotLeader:
commitment_to_use = _COMMITMENT_TO_SOLDERS[commitment or self._commitment]
return GetSlotLeader(RpcContextConfig(commitment_to_use))