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

stx-vault-sdk

v1.0.3

Published

Production SDK for STX vault and time-lock applications on the Stacks blockchain, with CLI, React hooks, analytics, and wallet support.

Readme

STX Vault STX Vault SDK

npm version Build Status License Downloads Stacks JavaScript TypeScript


Overview

STX Vault SDK is a production-ready JavaScript/TypeScript SDK for building STX vaults and time-lock applications on the Stacks blockchain.

It allows developers to:

  • Lock STX in smart contract vaults
  • Withdraw funds after the unlock period
  • Create new vaults (multi-pool support)
  • Track real-time vault events
  • Get vault analytics & TVL
  • Connect wallets like Xverse and Leather
  • Use React hooks for front-end apps
  • Interact via CLI commands

STX Vault UI


Installation

npm install stx-vault-sdk

Quick Start

Connect Wallet

import { connectWallet } from "stx-vault-sdk"
await connectWallet()

Lock STX

import { lockSTX } from "stx-vault-sdk"
await lockSTX(
  100000000,
  900000,
  PRIVATE_KEY,
  CONTRACT_ADDRESS,
  "stx-vault"
)

Withdraw STX

import { withdrawSTX } from "stx-vault-sdk"
await withdrawSTX(
  PRIVATE_KEY,
  CONTRACT_ADDRESS,
  "stx-vault"
)

Create Vault

import { createVault } from "stx-vault-sdk"
await createVault(
  900000,
  PRIVATE_KEY,
  CONTRACT_ADDRESS,
  "stx-vault"
)

Get Vault Balance

import { getVaultBalance } from "stx-vault-sdk"
const balance = await getVaultBalance(
  USER_ADDRESS,
  CONTRACT_ADDRESS,
  "stx-vault"
)
console.log("Vault Balance:", balance)

React Hook Example

import { useVault } from "stx-vault-sdk"
const { balance, refresh } = useVault(USER_ADDRESS, CONTRACT_ADDRESS, "stx-vault")

CLI Usage

npx stx-vault connect
npx stx-vault lock -a 1000000 -b 900000 -k YOUR_KEY -c SPXXXX -n stx-vault
npx stx-vault withdraw -k YOUR_KEY -c SPXXXX -n stx-vault
npx stx-vault create -b 900000 -k YOUR_KEY -c SPXXXX -n stx-vault

Analytics & TVL

import { getVaultStats, getVaultTVL } from "stx-vault-sdk"
const stats = await getVaultStats("https://api.yourvault.com")
const tvl = await getVaultTVL("https://api.yourvault.com")

Real-time Vault Events

import { watchVaultEvents } from "stx-vault-sdk"
const events = await watchVaultEvents(
  "https://api.mainnet.hiro.so",
  "SPXXXX.stx-vault"
)
console.log(events)

Supported Wallets

  • Xverse Wallet Xverse
  • Leather Wallet Leather

Badges & Ecosystem

  • Works on Stacks Mainnet
  • Supports mobile-first wallets
  • TypeScript-ready for front-end & back-end apps
  • Fully DeFi protocol-ready SDK

License

MIT