Type-safe, composable transaction builder with automatic retry, priority fees, and smart defaults, and multiple execution paths built on top of @solana/kit.
PipeIt simplifies Solana Kit's API and adds opinionated features like automatic retry, priority fees, smart defaults, and more.
Manual blockhash fetching, message building, signing, and confirmation
1import { 2 createSolanaRpc,3 createSolanaRpcSubscriptions,4 createTransactionMessage,5 setTransactionMessageFeePayer,6 setTransactionMessageLifetimeUsingBlockhash,7 appendTransactionMessageInstruction,8 pipe,9 sendAndConfirmTransactionFactory,10 address,11 lamports,12} from '@solana/kit';13import { signTransactionMessageWithSigners } from '@solana/signers';14import { getTransferSolInstruction } from '@solana-program/system';15 16const rpc = createSolanaRpc(rpcUrl);17const rpcSubscriptions = createSolanaRpcSubscriptions(wsUrl);18 19const { value: latestBlockhash } = await rpc.getLatestBlockhash().send();20 21const message = pipe(22 createTransactionMessage({ version: 0 }),23 tx => setTransactionMessageFeePayer(signer.address, tx),24 tx => setTransactionMessageLifetimeUsingBlockhash(latestBlockhash, tx),25 tx => appendTransactionMessageInstruction(26 getTransferSolInstruction({27 source: signer,28 destination: address(recipient),29 amount: lamports(1_000_000_000n),30 }),31 tx32 )33);34 35const signedTx = await signTransactionMessageWithSigners(message);36const sendAndConfirm = sendAndConfirmTransactionFactory({ rpc, rpcSubscriptions });37await sendAndConfirm(signedTx, { commitment: 'confirmed' });Automatic blockhash, retry logic, priority fees, and confirmation
1import { TransactionBuilder } from '@pipeit/core';2import { getTransferSolInstruction } from '@solana-program/system';3import { address, lamports } from '@solana/kit';4 5const signature = await new TransactionBuilder({ 6 rpc,7 autoRetry: true, 8 priorityFee: 'medium',9})10 .setFeePayerSigner(signer)11 .addInstruction(12 getTransferSolInstruction({13 source: signer,14 destination: address(recipient),15 amount: lamports(1_000_000_000n),16 })17 )18 .execute({19 rpcSubscriptions,20 commitment: 'confirmed',21 });Real mainnet examples of multi-step pipelines and atomic transactions
Single instruction, single transaction - baseline example
Multiple transfers batched into one atomic transaction
Instruction and transaction steps - shows when batching breaks
Swap tokens using Jupiter aggregator
Swap tokens using Titan aggregator with InstructionPlan API
MEV-protected bundle submission with Jito tip instructions
Direct QUIC submission to validator TPU - bypass RPC queues for maximum speed