Expand description
Official Rust QUIC client for Hello Moon Lunar Lander.
lunar-lander-quic-client is intentionally narrow:
- connect to a Lunar Lander QUIC endpoint
- generate the client certificate in code from your API key
- send one serialized Solana transaction payload per uni stream
- optionally send one serialized Solana transaction payload per bidi stream and read a compact admission response
It does not perform simulation, preflight, or transaction construction.
§What This Crate Does
Use this crate when you already have serialized transaction bytes and want to submit them over Lunar Lander’s QUIC ingress path with a small, focused client.
The client:
- opens one QUIC connection and reuses it across many sends
- generates a self-signed client certificate in code from your API key
- writes each transaction payload to its own uni stream
- optionally writes transaction payloads to bidi streams and decodes compact response frames
§What This Crate Does Not Do
This crate intentionally does not:
- build or sign transactions
- wrap HTTP submission APIs
- provide JSON-RPC helpers
- simulate or preflight transactions
§Example
use lunar_lander_quic_client::LunarLanderQuicClient;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let api_key = std::env::var("LUNAR_LANDER_API_KEY")?;
let client = LunarLanderQuicClient::connect(
"lunar-lander.hellomoon.io:16888",
api_key,
)
.await?;
let tx_bytes = create_signed_transaction_somewhere()?;
client.send_transaction(&tx_bytes).await?;
Ok(())
}
fn create_signed_transaction_somewhere() -> Result<Vec<u8>, Box<dyn std::error::Error>> {
unimplemented!("build and serialize a signed Solana transaction")
}§MEV Protection
Enable MEV protection by setting mev_protect: true in ClientOptions:
use lunar_lander_quic_client::{ClientOptions, LunarLanderQuicClient};
let client = LunarLanderQuicClient::connect_with_options(
"lunar-lander.hellomoon.io:16888",
std::env::var("LUNAR_LANDER_API_KEY")?,
ClientOptions {
mev_protect: true,
..ClientOptions::default()
},
)
.await?;Structs§
- Client
Options - Connection-level tuning for
LunarLanderQuicClient. - Lunar
Lander Quic Client - Connected Lunar Lander QUIC client.
- Quic
Submit Response - Typed response returned by
LunarLanderQuicClient::send_transaction_with_response.
Enums§
- Client
Error - Error type returned by the client library.
- Connection
Health - Reported reconnect state for a
LunarLanderQuicClient. - Quic
Submit Code - HTTP-like status category for a compact QUIC submit response.
- Quic
Submit Response Frame Error - Errors returned while decoding or encoding compact QUIC submit response frames.
Constants§
- DEFAULT_
PORT - Default UDP port for Lunar Lander QUIC ingress.
- LUNAR_
LANDER_ TPU_ PROTOCOL_ ID - ALPN identifier used by the Lunar Lander QUIC endpoint.
- MAX_
QUIC_ SUBMIT_ RESPONSE_ BODY_ BYTES - Maximum response body size this client will accept from a bidi submit.
- MAX_
QUIC_ SUBMIT_ RESPONSE_ FRAME_ BYTES - Maximum full response frame size this client will read from a bidi submit.
- MAX_
WIRE_ TX_ BYTES - Maximum serialized Solana transaction size accepted on the QUIC path.
- QUIC_
SUBMIT_ RESPONSE_ HEADER_ LEN - Header length for the compact QUIC submit response frame.
- QUIC_
SUBMIT_ RESPONSE_ VERSION - Version byte used by Lunar Lander’s compact QUIC submit response frame.