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

@elmntl/vaults-v2

v1.0.10

Published

SDK for Elemental Vault V2 (ELE6) - Multi-mint vault with swap adapters

Downloads

1,241

Readme

@elmntl/vaults-v2

SDK for Elemental Vault V2 (ELE6) - Multi-mint vault with swap adapters on Solana.

Installation

npm install @elmntl/vaults-v2
# or
pnpm add @elmntl/vaults-v2

Usage

import { Connection, PublicKey } from "@solana/web3.js";
import { AnchorProvider, Wallet } from "@coral-xyz/anchor";
import { ElementalV2Context, Pool, Position } from "@elmntl/vaults-v2";

// Initialize
const connection = new Connection("https://api.mainnet-beta.solana.com");
const provider = new AnchorProvider(connection, wallet, {});
const ctx = new ElementalV2Context(provider);

// Load pool
const poolAddress = new PublicKey("7cXYCSLPQqJDLeUQMYgJ2crM7KiCs9g7z71qvGVjS7F8");
const pool = await ctx.loadPool(poolAddress);

console.log(`APR: ${pool.aprPercent}%`);
console.log(`TVL: ${pool.currentSupply}`);
console.log(`Max Supply: ${pool.maxSupply}`);

// Load user position
const position = await ctx.loadPosition(pool);

console.log(`Status: ${position.status}`);
console.log(`Deposited: ${position.amount}`);
console.log(`Claimable: ${position.claimableAmount}`);

// Deposit
const depositTx = await ctx.deposit(position, "100"); // 100 tokens

// Deactivate (request withdrawal)
const deactivateTx = await ctx.deactivate(position, "50"); // 50 tokens

// Withdraw (after cooldown)
const withdrawTx = await ctx.withdraw(position);

API Reference

ElementalV2Context

Main entry point for interacting with the Elemental V2 vault program.

Pool Operations

  • loadPool(address: PublicKey): Promise<Pool> - Load a single pool
  • loadPools(addresses: PublicKey[]): Promise<Pool[]> - Load multiple pools

Position Operations

  • loadPosition(pool: Pool, owner?: PublicKey): Promise<Position> - Load user position
  • loadPositions(pools: Pool[], owner?: PublicKey): Promise<Position[]> - Load multiple positions

Actions

  • deposit(position, amount, minOutput?) - Deposit tokens into the vault
  • deactivate(position, amount) - Request withdrawal (starts cooldown)
  • claim(position) - Claim accumulated rewards
  • withdraw(position) - Withdraw tokens (after cooldown)
  • fundFaucet(pool, amount) - Fund the withdrawal faucet (admin)
  • updateEpoch(pool) - Advance the epoch
  • updateConfig(pool, params) - Update pool configuration (admin)

Pool

Wrapper for pool account data with helper methods.

Properties

  • address - Pool public key
  • aprPercent - APR as percentage string (e.g., "10.00")
  • currentSupply - Current TVL (human-readable)
  • maxSupply - Maximum supply cap
  • epochIndex - Current epoch number
  • epochDuration - Epoch duration in milliseconds
  • nextEpochDate - Date of next epoch
  • adapterType - Swap adapter type (Direct, OnRe, Jupiter, External)

Position

Wrapper for position account data.

Properties

  • status - Position status: "inactive", "queued", "farming", "unstaking", "unstaked", "claiming", "claimed"
  • amount - Currently staked amount
  • claimableAmount - Rewards available to claim
  • withdrawableAmount - Amount ready to withdraw
  • unstakingAmount - Amount in cooldown
  • canDeposit, canUnstake, canWithdraw, canClaim - Action availability

Program

  • Program ID: ELE6rYCZUaegWxVhWM4ef9pXZBAgGUVaVKkTbDvX6BMU
  • Network: Solana Mainnet

License

MIT