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

@perena/numeraire-sdk

v1.1.1

Published

Perena’s multi-asset stablecoin pool is a novel automated market maker (AMM) that enables seamless creation and swapping of stablecoins while optimizing liquidity and enhancing efficiency across markets

Downloads

204

Readme

Numeraire SDK

An SDK to build on top of Numeraire.

Program ID

NUMERUNsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P

NPM

Just run, this will take care of committing and tagging:

npm version patch
#or 
npm version minor
#or
npm version major

Then

git push --tags

Finally

npm publish

User Guide

Installation

# NPM
npm i @perena/numeraire-sdk
# YARN
yarn add @perena/numeraire-sdk
# Or, use any package manager of your choice.

Numéraire is Perena's stableswap AMM. It facilitates the launch, trading and liquidity provisioning of stablecoins by implementing composable, extensible pools and reducing idle-liquidity that exists in traditional AMM designs

This composable structure isolates risks and optimizes swaps by connecting established stablecoins with emerging ones. It consists in the combination of:

  • Seed Pool
  • Growth Pools.

USD* Price Calculation

The current price of USD* can be calculated with the help of SDK by following steps:

  • Simulate an add_liquidity call from the SDK with USDC, USDT, PYUSD on seed pool from an account
  • Get the amount of USD* minted during add_liquidity to that account
  • Now, we have Total amount of tokens deposited and amount of USD* minted during add_liquidity
USD_Star_Price = Total_Token_Deposited / USD_Star_Minted

The SDK provides you with off-chain helpers to call the Numéraire program.

User Guide

While integrating with Numéraire program and in general to build a optimal transaction its important to simulate the transactions and to set a proper Compute Unit Price and Limit. Guide to build Optimal transaction on Solana using @solana-developers/helpers, or simply use the helper buildOptimalTransaction available in the SDK.

Examples

Swap

import { PublicKey } from "@solana/web3.js";
import { init, swapExactIn, PRODUCTION_POOLS } from "@perena/numeraire-sdk";

(async () => {
  let state = init({ applyD: false });
  console.log(state);

  const { call } = await swapExactIn({
    pool: new PublicKey(PRODUCTION_POOLS.susd),
    in: 1, // pair index of 'in' token, can also use the mint address as string
    out: 0, // pair index of 'out' token, can also use the mint address as string
    exactAmountIn: 100_000,
    minAmountOut: 99_000,
    cuLimit: 1500000,
  });
  console.log(await call.rpc());
})();

Add liquidity

import { PublicKey } from "@solana/web3.js";
import {
  init,
  addLiquidity,
  loadKeypairFromFile,
  PRODUCTION_POOLS,
} from "@perena/numeraire-sdk";

(async () => {
  init({ payer: loadKeypairFromFile("./keypair.json") });

  const { call } = await addLiquidity({
    pool: new PublicKey(PRODUCTION_POOLS.tripool),
    maxAmountsIn: [15, 10, 10],
    minLpTokenMintAmount: 1,
    takeSwaps: true,
  });
  console.log(await call.rpc());
})();

Remove liquidity

import { PublicKey } from "@solana/web3.js";
import { init, removeLiquidity, PRODUCTION_POOLS } from "@perena/numeraire-sdk";

(async () => {
  init({ applyD: false });

  const decimals = 6;
  const d = 10 ** decimals;
  const { call } = await removeLiquidity({
    pool: new PublicKey(PRODUCTION_POOLS.usds),
    lpTokenRedeemAmount: 15 * d,
  });
  console.log(await call.rpc());
})();