npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@valiant-trade/vortex

v1.0.6

Published

Valiant's high-level typescript sdk to interact with Valiant's on-chain Vortex program.

Readme

Valiant Vortex SDK

Valiant Vortex is an open-source concentrated liquidity AMM contract on the Fogo blockchain. This SDK allows developers to interact with the Vortex program on both chains, enabling the creation and management of liquidity pools and positions, as well as performing swaps.

Overview

The Valiant Vortex SDK provides a comprehensive set of tools to interact with the Vortex program on the Fogo blockchain.

Note: This SDK uses Solana kit SDK.

Installation

To install the SDK, use the following command:

npm install @valiant-trade/vortex

Basic Usage

1. Wallet Creation

You can generate a file system wallet using the Solana CLI and load it in your program.

import { createKeyPairSignerFromBytes } from "@solana/kit";
import fs from 'fs';

const keyPairBytes = new Uint8Array(JSON.parse(fs.readFileSync('path/to/solana-keypair.json', 'utf8')));
const wallet = await createKeyPairSignerFromBytes(keyPairBytes);

2. Configure the Vortex SDK for Your Network

Valiant's Vortex SDK supports Fogo testnet currently. To select a network, use the setVortexConfig function. This ensures compatibility with the network you’re deploying on.

Example: Setting the SDK Configuration to Solana Devnet.

import { setVortexConfig } from '@valiant-trade/vortex';

await setVortexConfig('fogoTestnet');

Available networks are:

  • fogoTestnet

ℹ️ The setVortexConfig function accepts either one of Valiant's default network keys or a custom Address. This allows you to specify a custom configuration if needed.

3. Create the Swap Instructions

After configuring the SDK, you can perform a swap. Here is an example of how to perform a token swap using the Vortex SDK:

import { swapInstructions } from '@valiant-trade/vortex';
const poolAddress = "POOL_ADDRESS";
const mintAddress = "TOKEN_MINT";
const amount = 1_000_000n;
const slippageTolerance = 100; // 100 bps = 1%

const { instructions, quote } = await swapInstructions(
    devnetRpc,
    {
        inputAmount: amount,
        mint: mintAddress
    },
    poolAddress,
    wallet,
    slippageTolerance,
    wallet
);

4. Putting it all together

import { swapInstructions, setVortexConfig } from '@valiant-trade/vortex';
import { devnet } from "@solana/kit";
import { createSolanaRpc } from '@solana/rpc';

// Setup RPC connection to Fogo testnet
const devnetRpc = createSolanaRpc(devnet('https://testnet.fogo.io'));

// Set Vortex configuration for Fogo testnet
await setVortexConfig('fogoTestnet');

// Load wallet
const keyPairBytes = new Uint8Array(JSON.parse(fs.readFileSync('path/to/solana-keypair.json', 'utf8')));
const wallet = await createKeyPairSignerFromBytes(keyPairBytes);

// Request airdrop for testing
await devnetRpc.requestAirdrop(wallet.address, lamports(1000000000n)).send();

// Swap configuration
const poolAddress = address("3KBZiL2g8C7tiJ32hTv5v3KM7aK9htpqTw4cTXz1HvPt");
const mintAddress = address("So11111111111111111111111111111111111111112");
const amount = 1_000_000n; // 0.001 WFOGO (FOGO has 9 decimals)
const slippageTolerance = 100; // 100bps = 1%

// Get swap instructions and quote
const { instructions, quote } = await swapInstructions(
    devnetRpc,
    {
        inputAmount: amount,
        mint: mintAddress
    },
    poolAddress,
    wallet,
    slippageTolerance,
    wallet
);