rpc-bastion
v0.4.1
Published
RPC Bastion — one-line install for the Solana RPC & transaction resilience SDK. Re-exports the @rpc-bastion/* runtime libraries (core, fees, sender, wallet, observability); chaos testkit under the ./testkit subpath.
Downloads
451
Readme
rpc-bastion
The one-line install for RPC Bastion — the resilience layer for Solana dApps:
composable RPC transports, a production-grade transaction sender with Jito/MEV
routing and automatic RPC fallback, a priority-fee oracle, wallet integration, and
OpenTelemetry observability. Built on web3.js v2.0 (@solana/kit).
npm i rpc-bastionimport {
createResilientRpc, createSender, createFeeOracle,
wrapWalletAccount, registerOtelExporter,
} from 'rpc-bastion';
// Chaos testkit (tests only) lives on its own subpath — never in your app bundle:
import { createChaosTransport, createMockRpcServer } from 'rpc-bastion/testkit';This package re-exports the public surface of the five runtime libraries —
@rpc-bastion/core,
@rpc-bastion/fees,
@rpc-bastion/sender,
@rpc-bastion/wallet, and
@rpc-bastion/observability.
Types are re-exported, not redeclared, so a type you import from rpc-bastion is
the same type as the one from its origin package — mixing the umbrella with a
direct @rpc-bastion/core import is fully type-compatible.
À la carte (still first-class)
The umbrella is a convenience layer, not a replacement. Every library remains independently installable, so you can install only what you need for the tightest tree-shaking:
npm i @rpc-bastion/core @rpc-bastion/sender # just the resilient RPC + senderSubpaths
| Import | Re-exports | When |
|---|---|---|
| rpc-bastion | core · fees · sender · wallet · observability | your dApp / service |
| rpc-bastion/testkit | @rpc-bastion/testkit | tests (chaos simulator) |
| rpc-bastion/adapter | @rpc-bastion/wallet/adapter | classic @solana/wallet-adapter apps |
The adapter and observability paths use optional peers
(@solana/wallet-adapter-base / @solana/compat, and @opentelemetry/api);
install them when you use those features.
CLI
The diagnostics CLI ships separately as
@rpc-bastion/cli and exposes the
bastion command — no install needed:
npx @rpc-bastion/cli doctor --endpoints https://api.mainnet-beta.solana.comFull docs, the architecture diagram, and the landing-rate A/B benchmark live in the monorepo README. License: MIT.
