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

@deepbookie/predict-client

v0.1.2

Published

The first DeepBook Predict TypeScript client — unsigned PTB builders, indexer readers, and SVI vol-surface math for Sui's DeepBook Predict prediction market.

Readme

@deepbookie/predict-client

The first DeepBook Predict TypeScript client — for Sui's expiry-based, vol-surface-priced prediction market.

It is deliberately thin and signing-agnostic: it builds unsigned Sui transactions, reads the Predict indexer, and prices the SVI volatility surface. You sign the transactions however you like (a local keypair, or a browser wallet). Its only dependency is @mysten/sui.

Install

pnpm add @deepbookie/predict-client @mysten/sui

What's inside

  • Unsigned PTB buildersbuildCreateManager, buildMint, buildRedeem, buildRedeemPermissionless, buildMintRange, buildRedeemRange, buildSupply, buildWithdraw. Each returns a Transaction you sign at the edge.
  • Indexer readersgetActiveOracles, getOracleState, getLatestSvi, getVaultSummary, getManagerSummary, getManagerPnl.
  • Vol-surface mathupProbability / downProbability (UP = N(d2) from SVI) and buildCurve (the probability smile the UI renders).
  • UnitsfromScaled/toScaled (×1e9 fixed-point) and fromDusdc/toDusdc (6dp).

Example — propose a binary bet

import { SuiJsonRpcClient, getJsonRpcFullnodeUrl } from '@mysten/sui/jsonRpc';
import {
  buildMint,
  getActiveOracles,
  getOracleState,
  getLatestSvi,
  upProbability,
  toDusdc,
} from '@deepbookie/predict-client';

const client = new SuiJsonRpcClient({ url: getJsonRpcFullnodeUrl('testnet') });

const [oracle] = await getActiveOracles();
const { latest_price } = await getOracleState(oracle.oracle_id);
const svi = await getLatestSvi(oracle.oracle_id);
const strike = Math.round(latest_price!.forward); // ATM
const probUp = upProbability(svi!, latest_price!.forward, strike);

// Build the UNSIGNED bet (funding the manager from a wallet dUSDC coin)
const tx = buildMint({
  managerId,
  oracleId: oracle.oracle_id,
  expiry: oracle.expiry,
  strike,
  direction: 'UP',
  quantity: 1_000_000n,
  funding: { fundCoinId, depositAmount: toDusdc(50) },
});
// ...then sign `tx` with a keypair (MCP/CLI) or a browser wallet (web).

Note: @mysten/sui 2.x uses SuiJsonRpcClient + getJsonRpcFullnodeUrl from @mysten/sui/jsonRpc. Testnet IDs are provisional and will change at mainnet.

MIT.