Astralane
A sendTransaction that tips an Astralane tip account is sent through Astralane's sender in the region.
On the rpc-<region> endpoints, a sendTransaction that pays a tip to an Astralane tip account is sent through Astralane's sender in the same region. No separate tip transaction is needed: the tip is one of the instructions in the transaction you send.
- constant-k sends each transaction to the nearest Astralane region on its own:
rpc-newyorkto Astralane New York,rpc-frankfurtto Frankfurt,rpc-amsterdamto Amsterdam. You do not pick an Astralane region or endpoint. - Send the transaction with
"encoding":"base64". Base58 sends and version 1 transactions take the normal path. - The tip is a System Program transfer to a tip account in the transaction's own account keys, not one loaded through an address lookup table.
- The minimum tip is 1,000,000 lamports (0.001 SOL) today. A lower tip is sent from the constant-k node as usual. The minimum goes down as more tips go through Astralane; see Tip schedule.
- Your
skipPreflightsetting is passed on. - When the Astralane path is busy or does not answer, the transaction is sent from the constant-k node. No send is refused for this reason.
- The response carries
X-CK-Tx-Route: astralane, or a value that starts withastralane_fallback_when the transaction went from the constant-k node. - constant-k also registers a copy of each tipped transaction with Astralane.
- The tip is the user's, paid on-chain to Astralane. Staked and Neon Zero endpoints do not use this path.
Tip schedule
The minimum tip follows the Astralane tier of the constant-k account. Astralane sets the tier from the tips all constant-k users send through it in the last 7 days. More tips move the account up, and a higher tier has a lower minimum tip.
| Astralane tier | Tips through constant-k, last 7 days | Minimum tip | Bundles |
|---|---|---|---|
| Free (today) | — | 1,000,000 lamports (0.001 SOL) | No |
| VIP 1 | More than 4 SOL | 100,000 lamports (0.0001 SOL) | Yes |
| VIP 2 | More than 5 SOL | 100,000 lamports (0.0001 SOL) | Yes |
| VIP 3 | More than 8 SOL | 10,000 lamports (0.00001 SOL) | Yes |
- Astralane checks the tier every hour. A move up applies at the next check.
- If the 7-day total stays under a tier's mark, the account drops one tier after a 7-day grace period.
- When the tier changes, constant-k changes the minimum the same day and adds a row to the changelog.
- Source: Astralane fee tiers.
Bundles
Astralane bundles (sendBundle with an Astralane tip, up to 4 transactions) are ready on constant-k and open once the Astralane account reaches the tier that includes bundles. Until then, a bundle that tips only Astralane is answered with the error Astralane bundles are not available yet and is not sent. Bundles that tip Jito are sent through Jito as before.
Example
The tip transfer goes after the app's own instructions, in the same transaction.
npm install @solana/kit @solana-program/system @solana-program/compute-budgetimport { readFileSync } from "node:fs";
import {
address,
appendTransactionMessageInstructions,
createKeyPairSignerFromBytes,
createSolanaRpc,
createTransactionMessage,
getBase64EncodedWireTransaction,
lamports,
pipe,
setTransactionMessageFeePayerSigner,
setTransactionMessageLifetimeUsingBlockhash,
signTransactionMessageWithSigners,
} from "@solana/kit";
import {
getSetComputeUnitLimitInstruction,
getSetComputeUnitPriceInstruction,
} from "@solana-program/compute-budget";
import { getTransferSolInstruction } from "@solana-program/system";
// An Astralane tip account, https://astralane.gitbook.io/docs/low-latency/endpoints-and-configs
const tipAccount = address("astra4uejePWneqNaJKuFFA8oonqCE1sqF6b45kDMZm");
const endpoint = `https://rpc-newyork.constant-k.com/?api-key=${process.env.CK_API_KEY}`;
const rpc = createSolanaRpc(endpoint);
// A Solana CLI keypair file (JSON array of 64 bytes)
const payer = await createKeyPairSignerFromBytes(
new Uint8Array(JSON.parse(readFileSync(process.env.KEYPAIR_PATH!, "utf8"))),
);
const { value: latestBlockhash } = await rpc
.getLatestBlockhash({ commitment: "confirmed" })
.send();
const message = pipe(
createTransactionMessage({ version: 0 }),
(m) => setTransactionMessageFeePayerSigner(payer, m),
(m) => setTransactionMessageLifetimeUsingBlockhash(latestBlockhash, m),
(m) =>
appendTransactionMessageInstructions(
[
getSetComputeUnitLimitInstruction({ units: 1_000 }),
getSetComputeUnitPriceInstruction({ microLamports: 10_000n }),
getTransferSolInstruction({
source: payer,
destination: address("RECIPIENT_ADDRESS"),
amount: lamports(1_000_000n), // 0.001 SOL
}),
getTransferSolInstruction({
source: payer,
destination: tipAccount,
amount: lamports(1_000_000n), // the tip, after the app instructions
}),
],
m,
),
);
const signedTx = await signTransactionMessageWithSigners(message);
const wireTx = getBase64EncodedWireTransaction(signedTx);
// fetch, so the X-CK-Tx-Route response header is visible
const response = await fetch(endpoint, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "sendTransaction",
params: [wireTx, { encoding: "base64", skipPreflight: true }],
}),
});
const { result, error } = await response.json();
if (error) {
throw new Error(JSON.stringify(error));
}
console.log("Sent:", result, "Route:", response.headers.get("x-ck-tx-route"));