> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lasersell.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Send Targets

> Choose how to submit signed transactions: Default RPC, custom RPC, Helius Sender, or Astralane Iris.

## What is a Send Target?

A `SendTarget` tells the SDK where to submit your signed transaction. The LaserSell SDKs support four targets, each optimized for different use cases.

## Available Targets

### Default RPC

Uses the Solana public mainnet beta endpoint (`https://api.mainnet-beta.solana.com`). This endpoint is rate limited and best suited for testing only.

```typescript TypeScript theme={null}
import { sendTargetDefaultRpc } from "@lasersell/lasersell-sdk";

const target = sendTargetDefaultRpc();
```

```python Python theme={null}
from lasersell_sdk.tx import SendTargetRpc

target = SendTargetRpc()  # defaults to mainnet-beta
```

```rust Rust theme={null}
use lasersell_sdk::tx::SendTarget;

let target = SendTarget::Rpc { url: lasersell_sdk::tx::MAINNET_BETA_RPC_URL.into() };
```

```go Go theme={null}
target := lasersell.SendTargetDefaultRpc()
```

### Custom RPC

Specify your own RPC endpoint URL. Recommended for production with a private RPC provider such as Helius or Chainstack (free tiers available).

```typescript TypeScript theme={null}
import { sendTargetRpc } from "@lasersell/lasersell-sdk";

const target = sendTargetRpc("https://your-private-rpc.example.com");
```

```python Python theme={null}
from lasersell_sdk.tx import SendTargetRpc

target = SendTargetRpc(url="https://your-private-rpc.example.com")
```

```rust Rust theme={null}
let target = SendTarget::Rpc { url: "https://your-private-rpc.example.com".into() };
```

```go Go theme={null}
target := lasersell.SendTargetRpc("https://your-private-rpc.example.com")
```

### Helius Sender

Routes through the Helius Sender `/fast` endpoint for optimized transaction landing. No API key required for Helius Sender.

```typescript TypeScript theme={null}
import { sendTargetHeliusSender } from "@lasersell/lasersell-sdk";

const target = sendTargetHeliusSender();
```

```python Python theme={null}
from lasersell_sdk.tx import SendTargetHeliusSender

target = SendTargetHeliusSender()
```

```rust Rust theme={null}
let target = SendTarget::HeliusSender;
```

```go Go theme={null}
target := lasersell.SendTargetHeliusSender()
```

**Connection Warming (TypeScript only)**: For the best latency, the TypeScript SDK provides helpers to keep the Helius Sender connection warm:

```typescript theme={null}
import { startHeliusSenderWarmLoop, pingHeliusSender } from "@lasersell/lasersell-sdk";

// One-time ping
const ok = await pingHeliusSender();

// Continuous warm loop (pings every 30s)
const { stop } = startHeliusSenderWarmLoop({ intervalMs: 30_000 });
// Call stop() when done
```

The Rust SDK sends a single ping on first use. The Python and Go SDKs do not require connection warming.

### Astralane Iris

Routes through the Astralane Iris gateway. Requires an Astralane API key and supports regional endpoints for latency optimization.

```typescript TypeScript theme={null}
import { sendTargetAstralane } from "@lasersell/lasersell-sdk";

const target = sendTargetAstralane("ASTRALANE_API_KEY", "fr");
```

```python Python theme={null}
from lasersell_sdk.tx import SendTargetAstralane

target = SendTargetAstralane(api_key="ASTRALANE_API_KEY", region="fr")
```

```rust Rust theme={null}
let target = SendTarget::Astralane {
    api_key: "ASTRALANE_API_KEY".into(),
    region: Some("fr".into()),
};
```

```go Go theme={null}
target := lasersell.SendTargetAstralane("ASTRALANE_API_KEY", "fr")
```

## Available Regions (Astralane)

| Code | Location | Notes |
| - | - | - |
| `fr` | Frankfurt | Recommended |
| `fr2` | Frankfurt 2 | |
| `ams` | Amsterdam | Recommended |
| `ams2` | Amsterdam 2 | |
| `la` | San Francisco | |
| `ny` | New York | |
| `jp` | Tokyo | |
| `sg` | Singapore | |
| `lim` | Limburg | |
| `lit` | Lithuania | |

If no region is specified, the SDK defaults to `fr` (Frankfurt).

## Recommendations

| Use Case | Recommended Target |
| - | - |
| Testing and development | Default RPC |
| Production (general) | Helius Sender |
| Production (latency sensitive) | Astralane Iris |
| Production (existing RPC setup) | Custom RPC |

For automated trading bots, **Helius Sender** or **Astralane Iris** provide the best transaction landing rates. Avoid using the public Solana RPC in production as it is heavily rate limited.

## Send Mode vs Send Target

The `send_mode` field on `BuildSellTxRequest` and `BuildBuyTxRequest` tells the **server** which endpoint context to optimize the transaction for. The `SendTarget` controls where **your client** submits the signed transaction. For best results, align them:

| `send_mode` (server) | `SendTarget` (client) |
| - | - |
| `"rpc"` | `sendTargetRpc(url)` |
| `"helius_sender"` | `sendTargetHeliusSender()` |
| `"astralane"` | `sendTargetAstralane(...)` |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.