Struct solana_client::tpu_client::TpuClient
source · [−]pub struct TpuClient { /* private fields */ }
Expand description
Client which sends transactions directly to the current leader’s TPU port over UDP. The client uses RPC to determine the current leader and fetch node contact info
Implementations
Serialize and send transaction to the current and upcoming leader TPUs according to fanout size
Send a wire transaction to the current and upcoming leader TPUs according to fanout size
pub fn new(
rpc_client: Arc<RpcClient>,
websocket_url: &str,
config: TpuClientConfig
) -> Result<Self, TpuSenderError>
pub fn new(
rpc_client: Arc<RpcClient>,
websocket_url: &str,
config: TpuClientConfig
) -> Result<Self, TpuSenderError>
Create a new client that disconnects when dropped
pub fn send_and_confirm_messages_with_spinner<T: Signers>(
&self,
messages: &[Message],
signers: &T
) -> Result<Vec<Option<TransactionError>>, TpuSenderError>
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for TpuClient
impl !UnwindSafe for TpuClient
Blanket Implementations
pub default fn example() -> T
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more