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

@sorotip/sdk

v0.1.0

Published

TypeScript SDK for SoroTip — on-chain tipping and creator monetization on Stellar Soroban

Readme

@sorotip/sdk

TypeScript SDK for SoroTip — on-chain tipping and creator monetization on Stellar Soroban

npm TypeScript License: MIT Drips Wave

@sorotip/sdk wraps the SoroTip Soroban contract behind a typed client, a Freighter wallet adapter, formatting utilities, and a set of React hooks — everything a frontend needs to register creators, send tips, manage subscriptions, and read protocol data, without touching raw Soroban RPC calls or ScVal conversion directly.

Installation

npm install @sorotip/sdk

react is an optional peer dependency — only needed if you use the hooks in @sorotip/sdk (import from the package root as usual; everything else works in any TypeScript/JavaScript environment).

Quick Start

import { SoroTipClient, connectWallet } from "@sorotip/sdk";

const client = new SoroTipClient({
  network: "testnet",
  contractId: "CA...", // your deployed SoroTip contract id
});

// Connect the user's Freighter wallet (prompts if not already authorized)
const publicKey = await connectWallet();

// Register as a creator
const { profileId, txHash } = await client.registerCreator({
  name: "Ada",
  bio: "Building on Stellar",
  avatarIpfs: "Qm...",
});

// Send a tip (amount is a decimal USDC string)
await client.tip({
  to: "GDESTINATIONADDRESS...",
  amount: "5",
  messageIpfs: "",
});

// Open a $3/month subscription
await client.subscribe({ to: "GDESTINATIONADDRESS...", amountPerMonth: "3" });

// Read a creator's public profile — no wallet connection needed
const profile = await client.getProfile("GDESTINATIONADDRESS...");

React Hooks

import { SoroTipClient, useProfile, useTipHistory, useTopCreators } from "@sorotip/sdk";

const client = new SoroTipClient({ network: "testnet", contractId: "CA..." });

function CreatorPage({ wallet }: { wallet: string }) {
  const { profile, isLoading, refetch } = useProfile(client, wallet);
  const { tips } = useTipHistory(client, wallet, 10);

  if (isLoading) return <p>Loading...</p>;
  return (
    <div>
      <h1>{profile?.name}</h1>
      <button onClick={refetch}>Refresh</button>
      <ul>{tips?.map((t) => <li key={t.id}>{t.amount}</li>)}</ul>
    </div>
  );
}

function Leaderboard() {
  const { creators } = useTopCreators(client, 6);
  return <ul>{creators?.map((c) => <li key={c.wallet}>{c.name}</li>)}</ul>;
}

Every data-fetching hook takes the SoroTipClient instance as its first argument, so a single client (and its RPC connection) can be shared across a whole app.

API Reference

| Export | Description | |---|---| | SoroTipClient | Main client class — construct once with { network, contractId }. | | connectWallet() | Prompts the user to connect Freighter, returns their public key. | | getPublicKey() | Returns the already-connected wallet's public key. | | isConnected() | Whether this site has permission to access the wallet. | | isFreighterInstalled() | Whether the Freighter extension is present. | | signTransaction(xdr, opts?) | Signs a transaction XDR via Freighter. | | formatUSDC, toStroops | Convert between raw stroops and decimal USDC strings. | | truncateAddress, timeAgo, formatTipAmount, formatSubscriptionAmount, goalProgressPercent | Display formatting helpers. | | useProfile, useTipHistory, useSubscriptions, useTipGoal, useTopCreators, useProtocolStats, useWallet | React hooks. |

See the inline JSDoc on each export for full parameter and return details.

Contributing via Drips Wave

This repo is part of the Stellar Wave Program on Drips. Contributors browse open issues, get assigned by the maintainer, and earn USDC rewards for merged pull requests that resolve an issue. See CONTRIBUTING.md for the full workflow.

👉 https://drips.network/wave