Skip to main content

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.
import { sendTargetDefaultRpc } from "@lasersell/lasersell-sdk";

const target = 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).
import { sendTargetRpc } from "@lasersell/lasersell-sdk";

const target = 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.
import { sendTargetHeliusSender } from "@lasersell/lasersell-sdk";

const target = sendTargetHeliusSender();
Connection Warming (TypeScript only): For the best latency, the TypeScript SDK provides helpers to keep the Helius Sender connection warm:
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.
import { sendTargetAstralane } from "@lasersell/lasersell-sdk";

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

Available Regions (Astralane)

CodeLocationNotes
frFrankfurtRecommended
fr2Frankfurt 2
amsAmsterdamRecommended
ams2Amsterdam 2
laSan Francisco
nyNew York
jpTokyo
sgSingapore
limLimburg
litLithuania
If no region is specified, the SDK defaults to fr (Frankfurt).

Recommendations

Use CaseRecommended Target
Testing and developmentDefault 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(...)