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

solami

v0.1.7

Published

TypeScript SDK for [solami.fast](https://solami.fast) - Solana RPC, gRPC streaming, WebSocket subscriptions, and SWQOS transaction landing.

Readme

solami

TypeScript SDK for solami.fast - Solana RPC, gRPC streaming, WebSocket subscriptions, and SWQOS transaction landing.

Install

npm install solami

Setup

Create a .env file:

SOLAMI_RPC_TOKEN=your_rpc_token_here
SOLANA_KEYPAIR=your_base58_keypair_here
SOLAMI_SWQOS_KEY=your_swqos_key_here

Get your tokens from the solami.fast dashboard.

Usage

Get Account Info

import "dotenv/config";
import { PublicKey } from "@solana/web3.js";
import { solamiFromEnv } from "solami";

const client = solamiFromEnv().build();
const pubkey = new PublicKey("11111111111111111111111111111111");
const account = await client.connection.getAccountInfo(pubkey);

console.log(`Lamports: ${account?.lamports}`);
console.log(`Owner: ${account?.owner}`);

Get Balance

import "dotenv/config";
import { PublicKey, LAMPORTS_PER_SOL } from "@solana/web3.js";
import { solamiFromEnv } from "solami";

const client = solamiFromEnv().build();
const pubkey = new PublicKey("11111111111111111111111111111111");
const balance = await client.connection.getBalance(pubkey);

console.log(`Balance: ${balance / LAMPORTS_PER_SOL} SOL`);

Send Transaction (RPC)

import "dotenv/config";
import { Keypair, PublicKey, Transaction, SystemProgram, sendAndConfirmTransaction } from "@solana/web3.js";
import bs58 from "bs58";
import { solamiFromEnv } from "solami";

const client = solamiFromEnv().build();
const payer = Keypair.fromSecretKey(bs58.decode(process.env.SOLANA_KEYPAIR!));
const recipient = new PublicKey("11111111111111111111111111111112");

const blockhash = await client.connection.getLatestBlockhash();
const tx = new Transaction({ ...blockhash, feePayer: payer.publicKey }).add(
  SystemProgram.transfer({ fromPubkey: payer.publicKey, toPubkey: recipient, lamports: 1 }),
);

const sig = await sendAndConfirmTransaction(client.connection, tx, [payer]);
console.log(`Signature: ${sig}`);

Send Transaction (SWQOS)

import "dotenv/config";
import { Keypair, PublicKey, TransactionMessage, VersionedTransaction, SystemProgram } from "@solana/web3.js";
import bs58 from "bs58";
import { solamiFromEnv, buildTipIx } from "solami";

const client = solamiFromEnv().buildWithSwqos();
const payer = Keypair.fromSecretKey(bs58.decode(process.env.SOLANA_KEYPAIR!));
const recipient = new PublicKey("11111111111111111111111111111112");

const blockhash = await client.connection.getLatestBlockhash();
const message = new TransactionMessage({
  payerKey: payer.publicKey,
  recentBlockhash: blockhash.blockhash,
  instructions: [
    SystemProgram.transfer({ fromPubkey: payer.publicKey, toPubkey: recipient, lamports: 1 }),
    buildTipIx(payer.publicKey, 0.0001),
  ],
}).compileToV0Message();

const tx = new VersionedTransaction(message);
tx.sign([payer]);

const sig = await client.landTransaction(tx);
console.log(`Signature: ${sig}`);

gRPC: Subscribe to Slots

import "dotenv/config";
import { solamiFromEnv, SubscriptionBuilder } from "solami";

const client = solamiFromEnv().build();
const request = new SubscriptionBuilder()
  .addSlots("slot_sub", { filterByCommitment: undefined, interslotUpdates: false })
  .build();

const stream = await client.grpc.subscribe(request);

stream.on("data", (msg: any) => {
  if (msg.slot) {
    console.log(`Slot: ${msg.slot.slot} | Parent: ${msg.slot.parent} | Status: ${msg.slot.status}`);
  }
});

gRPC: Subscribe to Transactions

import "dotenv/config";
import { solamiFromEnv, CommitmentLevel } from "solami";
import bs58 from "bs58";

const client = solamiFromEnv().build();
const stream = await client.grpc.subscribeTransactions(
  "tx_sub",
  ["11111111111111111111111111111111"],
  CommitmentLevel.CONFIRMED,
);

stream.on("data", (msg: any) => {
  if (msg.transaction) {
    const sig = bs58.encode(Buffer.from(msg.transaction.transaction.signature));
    console.log(`Signature: ${sig} | Slot: ${msg.transaction.slot}`);
  }
});

WebSocket: Subscribe to Slots

import "dotenv/config";
import { solamiFromEnv } from "solami";

const client = solamiFromEnv().build();
client.ws.connection.onSlotChange((slotInfo) => {
  console.log(`Slot: ${slotInfo.slot} | Parent: ${slotInfo.parent} | Root: ${slotInfo.root}`);
});

WebSocket: Subscribe to Logs

import "dotenv/config";
import { PublicKey } from "@solana/web3.js";
import { solamiFromEnv } from "solami";

const client = solamiFromEnv().build();
const programId = new PublicKey("11111111111111111111111111111111");

client.ws.connection.onLogs(programId, (log) => {
  console.log(`Signature: ${log.signature}`);
  for (const line of log.logs) {
    console.log(`  ${line}`);
  }
}, "confirmed");

Builder Configuration

import { solami } from "solami";

const client = solami("your_rpc_token")
  .grpcToken("optional_separate_grpc_token")
  .rpcBase("https://custom-rpc.example.com")
  .wsBase("wss://custom-ws.example.com")
  .grpcUrl("https://custom-grpc.example.com")
  .swqosKey("your_swqos_key")
  .buildWithSwqos();

Environment Variables

| Variable | Required | Description | |---|---|---| | SOLAMI_RPC_TOKEN | Yes | RPC/gRPC API token | | SOLAMI_GRPC_TOKEN | No | Separate gRPC token (defaults to RPC token) | | SOLAMI_SWQOS_KEY | No | SWQOS API key (required for buildWithSwqos()) | | SOLANA_KEYPAIR | No | Base58 keypair (required for sending transactions) |

License

MIT