
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
anchor-litesvm
Advanced tools
`anchor-litesvm` is a small extension to [LiteSVM](https://github.com/LiteSVM/litesvm) that enables using both Anchor and LiteSVM with minimal code changes. It does this by exporting a `LitesvmProvider` class that can be used as a replacement for `AnchorP
anchor-litesvm
is a small extension to LiteSVM
that enables using both Anchor and LiteSVM with minimal code changes. It does this by exporting a LitesvmProvider
class that can be used as a replacement for AnchorProvider
during testing.
litesvm
is synchronous because it is entirely compute-bound. However, anchor-litesvm
uses async because
it implements interfaces that require async. If you would like to avoid async tests, you can simply
use regular litesvm
without anchor-litesvm
.
Here's an example using LitesvmProvider
to test an Anchor program:
import { fromWorkspace, LiteSVMProvider } from "anchor-litesvm";
import { Keypair, PublicKey } from "@solana/web3.js";
import { BN, Program, Wallet } from "@coral-xyz/anchor";
import { Puppet } from "./anchor-example/puppet";
const IDL = require("./anchor-example/puppet.json");
test("anchor", async () => {
const client = fromWorkspace("tests/anchor-example");
const provider = new LiteSVMProvider(client);
const puppetProgram = new Program<Puppet>(IDL, provider);
const puppetKeypair = Keypair.generate();
await puppetProgram.methods
.initialize()
.accounts({
puppet: puppetKeypair.publicKey,
})
.signers([puppetKeypair])
.rpc();
const data = new BN(123456);
await puppetProgram.methods
.setData(data)
.accounts({
puppet: puppetKeypair.publicKey,
})
.rpc();
const dataAccount = await puppetProgram.account.data.fetch(
puppetKeypair.publicKey,
);
expect(dataAccount.data.eq(new BN(123456)));
});
yarn add anchor-litesvm
FAQs
`anchor-litesvm` is a small extension to [LiteSVM](https://github.com/LiteSVM/litesvm) that enables using both Anchor and LiteSVM with minimal code changes. It does this by exporting a `LitesvmProvider` class that can be used as a replacement for `AnchorP
The npm package anchor-litesvm receives a total of 130 weekly downloads. As such, anchor-litesvm popularity was classified as not popular.
We found that anchor-litesvm demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.