call the first three ahead of time, keep the signed bytes, send when you need to
Load it
import * as web3 from "@solana/web3.js";
import { createFastlane } from "https://fastlanes.app/sdk/fastlane.mjs"; // types: https://fastlanes.app/sdk/fastlane.d.ts
const fl = createFastlane({ site: "https://fastlanes.app", web3, keypair });The flow
const built = await fl.buildTx({ kind: "buy", mint: "...pump", lamports: 50_000_000, slippageBps: 300 });
// built.simulation: [{ ok, unitsConsumed, err }] a price past slippage fails here
const signed = fl.sign(built); // the blockhash is good for about 60 s
// ... later, when the moment comes:
const r = await fl.sendFast(signed); // { sig, status: "landed", ms, slot }
// launch + first buy: two transactions, one bundle
const mint = web3.Keypair.generate();
const b = await fl.buildTx({ kind: "launch", mint: mint.publicKey.toBase58(), name, symbol, uri, lamports: 100_000_000 });
await fl.sendFast(fl.sign(b, [mint]));Methods
| Method | Does |
|---|---|
buildTx(intent) | unsigned base64 v0 transactions with the CU limit from a simulation, priority fee, 0.5% fee, Memo and Jito tip |
simulate(built) | simulateTransaction per transaction: ok, compute units, last logs |
sign(built, extra?) | signs locally; for a launch, pass the mint keypair |
sendFast(signed) | from your machine to six Jito engines and the RPC at once (a bundle to Jito only), then times the confirmation |
launcher(id?) | a shared launcher, or the gallery |