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

@earnwithalee/stacksrank-sdk

v1.0.0

Published

SDK for interacting with StacksRank smart contracts on Stacks blockchain. Includes Clarity value encoding, contract addresses, wallet helpers, and Hiro API utilities.

Readme

StacksRank SDK

Official SDK for interacting with StacksRank smart contracts on the Stacks blockchain.

Features

  • 🔐 Clarity Value Encoding — Encode string-ascii, uint, int, bool, principal, and buffer types
  • 📋 Contract Registry — All deployed StacksRank contract addresses and functions
  • 🔗 Wallet Helpers — Connect to Leather wallet and call contracts
  • 🌐 Hiro API Utilities — Query balances, transactions, and read-only contract calls
  • Zero Dependencies — Pure JavaScript, works in Node.js and browsers

Installation

npm install @earnwithalee/stacksrank-sdk

Quick Start

const { encoding, contracts, api } = require('@earnwithalee/stacksrank-sdk');

// Encode Clarity values
const name = encoding.encodeStringAscii("MyBuilder");
const amount = encoding.encodeUint(1000000);

// Get contract addresses
const addresses = contracts.getContractAddresses();
console.log(addresses.FEB_CHECKIN);
// → "SP2F500B8DTRK1EANJQ054BRAB8DDKN6QCMXGNFBT.feb-builder-check-in"

// Check a balance
const { stx } = await api.getBalance("SP2J6ZY48GV1EZ5V2V5RB9MP66SW86PYKKNRV9EJ7");
console.log(`Balance: ${stx} STX`);

Wallet Connection (Browser)

const { wallet } = require('stacksrank-sdk');

// Check if wallet is installed
const { available, provider } = wallet.detectWallet();

// Connect and get address
const address = await wallet.connectWallet();
console.log(`Connected: ${wallet.formatAddress(address)}`);

// Call a contract
await wallet.callContract({
    contract: 'SP2F500B8DTRK1EANJQ054BRAB8DDKN6QCMXGNFBT.feb-builder-check-in',
    functionName: 'check-in',
    functionArgs: [],
    network: 'mainnet'
});

API Reference

Encoding

| Function | Description | |---|---| | encodeStringAscii(str) | Encode ASCII string to Clarity hex | | encodeStringUtf8(str) | Encode UTF-8 string to Clarity hex | | encodeUint(val) | Encode unsigned int128 to Clarity hex | | encodeInt(val) | Encode signed int128 to Clarity hex | | encodeBool(val) | Encode boolean to Clarity hex | | encodePrincipal(addr) | Encode Stacks address to Clarity hex | | encodeBuffer(data) | Encode raw buffer to Clarity hex |

Contracts

| Function | Description | |---|---| | CONTRACTS | Full contract registry with addresses and functions | | DEPLOYER | The deployer principal address | | getContractAddresses() | Get a flat map of contract addresses |

Wallet

| Function | Description | |---|---| | detectWallet() | Check if Leather/Hiro wallet is installed | | connectWallet() | Connect and return the STX address | | callContract(opts) | Call a smart contract via wallet | | formatAddress(addr) | Truncate address for display |

API

| Function | Description | |---|---| | getBalance(addr, network?) | Get STX and token balances | | getTransactions(addr, opts?) | Fetch recent transactions | | getTransactionStatus(txId) | Check transaction status | | readContract(addr, name, fn) | Call a read-only contract function | | getBlockHeight(network?) | Get current block height | | microToStx(val) | Convert microSTX to STX | | stxToMicro(val) | Convert STX to microSTX |

Deployed Contracts

| Contract | Address | |---|---| | Reputation | SP2F500B8DTRK1EANJQ054BRAB8DDKN6QCMXGNFBT.simple-reputation | | Swap | SP2F500B8DTRK1EANJQ054BRAB8DDKN6QCMXGNFBT.simple-swap | | Vault | SP2F500B8DTRK1EANJQ054BRAB8DDKN6QCMXGNFBT.simple-vault | | Check-in | SP2F500B8DTRK1EANJQ054BRAB8DDKN6QCMXGNFBT.feb-builder-check-in | | Builder Tools | SP2F500B8DTRK1EANJQ054BRAB8DDKN6QCMXGNFBT.defi-builder-tools | | Fee Distributor | SP2F500B8DTRK1EANJQ054BRAB8DDKN6QCMXGNFBT.direct-fee-distributor | | STX Distributor | SP2F500B8DTRK1EANJQ054BRAB8DDKN6QCMXGNFBT.stx-distributor |

License

MIT © Earnwithalee7890