
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
customvirtualcurve
Advanced tools
A TypeScript client implementation for interacting with Virtual Curve on Solana
A TypeScript client implementation for interacting with Virtual Curve on Solana
Note: There is a "Critics and Development Process" section at the end of this document where I discuss my critics about the assignment and my development process.
The Virtual Curve TypeScript Client provides a seamless interface for interacting with Virtual Curve pools on the Solana blockchain. It offers functionality for creating and managing virtual AMM configurations and pools with customizable parameters.
pnpm install @solana/web3.js @coral-xyz/anchor bn.js
import { Connection } from "@solana/web3.js";
import { VirtualCurveClient } from "./virtual-curve";
const connection = new Connection("YOUR_RPC_URL", "confirmed");
const vcClient = await VirtualCurveClient.create(connection, {
cluster: "mainnet" // or "devnet", "localhost"
});
const configKeypair = Keypair.generate();
const createConfigParams = {
configPubkey: configKeypair.publicKey,
feeClaimer: userPublicKey,
owner: userPublicKey,
quoteMint: quoteMintPublicKey,
payer: userPublicKey,
poolFees: {
baseFee: {
cliffFeeNumerator: new BN(2_500_000),
numberOfPeriod: 0,
reductionFactor: new BN(0),
periodFrequency: new BN(0),
feeSchedulerMode: 0,
},
dynamicFee: null,
},
// ... other configuration parameters
};
const createConfigIx = await vcClient.createConfig(createConfigParams);
const createPoolParams = {
payer: userPublicKey,
baseMint: baseMintPublicKey,
quoteMint: quoteMintPublicKey,
config: configPubkey,
instructionParams: {
name: "Pool Name",
symbol: "POOL",
uri: "metadata-uri.com",
},
};
const { transaction, pool } = await vcClient.createPool(createPoolParams);
You can find complete working examples in the src/examples directory. The examples demonstrate:
Check out src/examples/example.ts for a comprehensive example that shows how to:
The main client class for interacting with Virtual Curve.
create(connection: Connection, options: ClientOptions): Creates a new client instancecreateConfig(params: CreateConfigParams): Creates a new Virtual Curve configurationcreatePool(params: CreatePoolParams): Creates a new pool with specified parametersDocumentation and Example Inconsistencies
poolConfig.baseMint) that don't exist in the current program and IDLProgram Understanding
src/examples/example.ts) to demonstrate the SDK's capabilitiesFAQs
A TypeScript client implementation for interacting with Virtual Curve on Solana
We found that customvirtualcurve 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.