Skip to content

Repository files navigation

sol.js

The ethers.js of the Solana protocol.

A high-level, developer-friendly TypeScript library for Solana with first-class Jito bundle support.

Goals

  • Ethers.js-style developer experience for Solana
  • Native, first-class Jito bundles (not bolted on)
  • Clean core primitives: Provider, Signer/Wallet, Transaction, Bundle
  • Modern ESM + dual CJS builds

Architecture

src/
├── index.ts                 # Public API
├── types.ts
├── provider.ts              # High-level Provider
├── signer.ts                # KeypairSigner + Wallet
├── transaction.ts           # Chainable Transaction builder
├── jito/
│   ├── index.ts
│   ├── client.ts            # Block Engine client
│   └── bundle.ts            # First-class Bundle + tip support
└── utils/

Status

  • Project structure + TypeScript setup
  • Provider (Connection, getBalance, sendTransaction, sendAndConfirm)
  • Wallet / KeypairSigner
  • Transaction builder
  • Jito Bundle + tip serialization
  • JitoClient
  • Examples + smoke test
  • More tests + CI
  • Pump.fun helpers (future)

Install

npm install sol.js @solana/web3.js bs58

Quick Start

import { Provider, Wallet, Transaction, Bundle } from "sol.js";

const provider = new Provider("devnet", { jito: true });
const wallet = await Wallet.fromFile("~/.config/solana/id.json");
provider.setSigner(wallet);

// Normal transfer
const tx = new Transaction()
  .transfer(wallet.publicKey, recipient, 1_000_000);

const sig = await tx.send(provider);

// Jito bundle with tip
const bundle = new Bundle()
  .add(await tx.build(provider))
  .tip(0.0001); // 0.0001 SOL tip

const bundleId = await provider.sendBundle(bundle);
console.log("Bundle ID:", bundleId);

License

MIT © Dr. Q and Company

About

The ethers.js of Solana

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages