Registry / devops / solami

solami

JSON →
library0.1.8jsnpmunverified

TypeScript SDK for solami.dev, providing Solana RPC, gRPC streams, WebSocket subscriptions, and SWQOS transaction landing over QUIC. Version 0.1.8 requires Node >=18. Key differentiator: type-stated builder pattern for selective service inclusion (RPC, gRPC, SWQOS), built-in tip instruction for QUIC landing, and regional routing (AMS, FRA, NYC). Ships TypeScript types. Release cadence: active development with rapid iterations.

npm install solami
INSTALL
IMPORT
SIG · SOLAMI
S
solami
devopsjavascriptv0.1.8
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

builder
import { builder } from 'solami'
import builder from 'solami'
Named export only; no default export exists.
CommitmentLevel
import { CommitmentLevel } from 'solami'
Enum with values PROCESSED, CONFIRMED, FINALIZED.
buildTipIx
import { buildTipIx } from 'solami'
Creates a SystemProgram.transfer instruction to a random tip account; must be included in transactions landed via SWQOS.
Region
import { Region } from 'solami'
const { Region } = require('solami')
Enum with Global, Ams, Fra, Nyc. Use for regional routing.

Initialize Solami client with RPC and gRPC, fetch slot and block, subscribe to slot changes and gRPC transaction streams.

import { builder, CommitmentLevel } from 'solami'; const client = await builder() .withRpc(process.env.SOLAMI_RPC_TOKEN ?? '') .withGrpc(process.env.SOLAMI_RPC_TOKEN ?? '') .build(); const slot = await client.rpc().connection.getSlot(); const block = await client.rpc().getBlock(slot); client.ws().connection.onSlotChange((info) => console.log(info.slot)); const stream = await client.grpc().subscribeTransactions( 'pumpfun', ['6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P'], CommitmentLevel.PROCESSED, ); stream.on('data', (msg) => console.log(msg));
Debug
Known issues
gotchaQUIC buffers outgoing frames; if the script exits immediately after landTransaction, the FIN frame may be dropped and the transaction never sent.
fix
Keep the Node.js process alive for a few seconds after landTransaction (e.g., await new Promise(r => setTimeout(r, 2000))).
affects: >=0.1.0
breakingVersion 0.1.8 is early-stage; the API may change without notice. The builder pattern and method signatures are not yet stable.
fix
Pin dependency to exact version (e.g., "solami": "0.1.8") and review changelog before upgrading.
affects: >=0.1.0
gotchabuildTipIx must be included in the transaction for landTransaction to accept it, otherwise it will reject.
fix
Always call buildTipIx(payer.publicKey, tipAmountInSol) and add the returned instruction to your transaction.
affects: >=0.1.0
deprecatedNo deprecated features known yet as the package is pre-1.0.
Errors
Common errors & fixes
TypeError: Cannot read properties of undefined (reading 'connection')
Attempting to call client.rpc() without enabling withRpc in the builder.
fix
Ensure builder().withRpc(token) is called before .build().
Error: 12 UNIMPLEMENTED: Method not found
Using an invalid gRPC method or incorrect region
fix
Check that the grpc method name is correct and region is set via .withGrpc(token).grpcRegion(Region.Ams) or similar.
Error: Transaction failed: missing tip
Transaction passed to landTransaction does not include a tip instruction.
fix
Add buildTipIx(payer.publicKey, 0.0001) to the transaction instructions.
Could not find a declaration file for module 'solami'.
Missing TypeScript types; likely using an older version that doesn't ship types.
fix
Update to solami@0.1.8 which includes bundled type declarations. Or install @types/solami if it becomes available.
Upgrade
Version history
0.1.8latest on npm
Audit
Dependencies
@solana/web3.jsoptionalPeer dependency for Keypair, TransactionMessage, VersionedTransaction types and helpers
bs58optionalUsed for encoding/decoding base58 keys and keypairs
Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
packagesolami
solami — npm install solami · libregistry