
Security News
US Government Forces Anthropic to Pull Claude Fable Days After Launch
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.
litesvm-with-snapshot
Advanced tools
[!NOTE] This is a fork.
This is the NodeJS wrapper for LiteSVM. It brings best-in-class Solana testing to NodeJS, giving you a powerful, fast and ergonomic way to test Solana programs in TS/JS.
For a standard testing workflow, LiteSVM offers an experience superior to solana-test-validator (slow, unwieldy)
and bankrun (reasonably fast and powerful, but inherits a lot of warts from solana-program-test).
This example just transfers lamports from Alice to Bob without loading any programs of our own. It uses the jest test runner but you can use any test runner you like.
import { LiteSVM } from "litesvm";
import {
PublicKey,
Transaction,
SystemProgram,
Keypair,
LAMPORTS_PER_SOL,
} from "@solana/web3.js";
test("one transfer", () => {
const svm = new LiteSVM();
const payer = new Keypair();
svm.airdrop(payer.publicKey, BigInt(LAMPORTS_PER_SOL));
const receiver = PublicKey.unique();
const blockhash = svm.latestBlockhash();
const transferLamports = 1_000_000n;
const ixs = [
SystemProgram.transfer({
fromPubkey: payer.publicKey,
toPubkey: receiver,
lamports: transferLamports,
}),
];
const tx = new Transaction();
tx.recentBlockhash = blockhash;
tx.add(...ixs);
tx.sign(payer);
svm.sendTransaction(tx);
const balanceAfter = svm.getBalance(receiver);
expect(balanceAfter).toBe(transferLamports);
});
Note: by default the LiteSVM instance includes some core programs such as
the System Program and SPL Token.
yarn add litesvm
Make sure you have Yarn and the Rust toolchain installed.
Then run yarn to install deps, run yarn build to build the binary and yarn test to run the tests.
FAQs
Unknown package
We found that litesvm-with-snapshot demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.