npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

solana-transaction-sender

v1.0.8

Published

Send solana transaction fast and secure to current slot. No high fee needed

Downloads

54

Readme

solana-transaction-sender

Send solana transaction fast and secure to current slot. No high fee needed

Join to follow updates: https://discord.gg/u955DwU8

A lightweight utility library for sending Solana transactions with automatic retries, proxy support, and flexible commitment confirmation handling.

Installation

npm install solana-transaction-sender
# or
pnpm install solana-transaction-sender

Features

  • Initialize a Solana RPC connection with or without a proxy.
  • Send transactions (VersionedTransaction, Transaction, Uint8Array, or base64 string).
  • Automatic retry handling for RPC/network errors and rate-limiting.
  • Track transaction status until your desired confirmation level (processed, confirmed, finalized).
  • Block height expiry checks to avoid wasting resources on invalid transactions.

Quick Start

import sendSolanaTransaction, {
  initSolanaConnection,
  fetchTransactionStatus,
} from "solana-transaction-sender";
import { VersionedTransaction } from "@solana/web3.js";

// Create a connection
const connection = initSolanaConnection("https://api.mainnet-beta.solana.com");

// Send a transaction
(async () => {
  const tx = new VersionedTransaction(...); // your transaction
  const signature = await sendSolanaTransaction(tx, {
    connection,
    commitment: "confirmed",
    maxAttempts: 15,
    mode: "slow",
  });

  console.log("✅ Sent transaction:", signature);

  // Check its status
  const status = await fetchTransactionStatus(signature, connection);
  console.log("🔍 Final status:", status);
})();

API Reference

initSolanaConnection(endpoint?, proxyProvider?, config?)

Creates a new Solana RPC connection.

  • endpoint — RPC URL (default: https://api.mainnet-beta.solana.com).
  • proxyProvider — function returning a proxy URL (e.g. () => "http://127.0.0.1:8080").
  • config — additional ConnectionConfig options.

sendSolanaTransaction(transaction, options, attempt?)

Sends a transaction and waits for confirmation.

  • transaction — one of VersionedTransaction | Transaction | Uint8Array | string (base64).
  • options — configuration object (see below).
  • attempt — internal retry counter (not required for usage).

Options (SolanaTransactionOptions)

  • commitment — confirmation level ("processed" | "confirmed" | "finalized"). Default: "processed".
  • connection — custom RPC connection (Connection).
  • pollInterval — interval in ms for status polling. Default: 2000.
  • maxAttempts — maximum retry attempts. Default: 10.
  • blockExpiryMargin — block height margin for transaction expiry. Default: 300.
  • sendOptions — extra options for sendRawTransaction.
  • checkBlockExpiry — whether to stop if block height exceeds expiry. Default: true.
  • mode"fast" or "slow"; affects retry pacing.

fetchTransactionStatus(signature, connection)

Fetches the current status of a transaction by signature. Returns: "processed" | "confirmed" | "finalized" | void.


Proxy Example

const connection = initSolanaConnection(
  "https://api.mainnet-beta.solana.com",
  () => "http://127.0.0.1:8888"
);