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

@recallnet/sdk

v0.0.14

Published

Core SDK for building with Recall EVM contracts

Downloads

79

Readme

@recallnet/sdk

Official JavaScript/TypeScript SDK for the Recall Network.

Table of Contents

Background

This package is a JS/TS SDK for the Recall Network. It is built on top of viem interfaces with Recall subnets for various operations, including managing:

  • Buckets: create buckets, add objects, get objects, delete objects, etc.
  • Credit: buy credit, approve credit usage, get credit balance, etc.
  • Accounts: get token balance, deposit funds, withdraw funds, etc.
  • Blobs: create blob manager, add blob manager, delete blob manager, etc. (note: experimental)

Usage

First, install the package:

# Note: this package is not published to NPM yet, so you need to install it from the source
pnpm add @recallnet/sdk

Recall client & wallet setup

Create a wallet client from a private key:

import { createWalletClient } from "viem";
import { privateKeyToAccount } from "viem/accounts";

import { testnet } from "@recallnet/chains";
import { RecallClient } from "@recallnet/sdk/client";

// Create a wallet client from a private key
const privateKey =
  "0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6";
const walletClient = createWalletClient({
  account: privateKeyToAccount(privateKey),
  chain: testnet,
  transport: http(),
});

// Create a client from the wallet client
const recall = new RecallClient({ walletClient });

Bucket operations

// Create a bucket
const bucketManager = client.bucketManager();
const {
  result: { bucket },
} = await bucketManager.create();
console.log("Bucket created:", bucket); // 0xff00...9d

// List buckets
const { result: buckets } = await bucketManager.list();
console.log("Buckets:", buckets);

// Add an object to a bucket
const key = "hello/world";
const path = fs.readFileSync("path/to/file.txt");
const { meta } = await bucketManager.add(bucket, key, path);
console.log("Object added at:", meta?.tx?.transactionHash);

// Get an object from a bucket
const { result: object } = await bucketManager.get(bucket, key);
const contents = new TextDecoder().decode(object);
console.log("Object:", contents);

Credit operations

// Set up credit manager
const creditManager = client.creditManager();

// Buy credit
const { meta } = await creditManager.buy(parseEther("1"));
console.log("Credit bought:", meta?.tx?.transactionHash);

// Approve credit usage
const to = "0x15d34aaf54267db7d7c367839aaf71a00a2c6a65";
const { meta: approveMeta } = await creditManager.approve(to);
console.log("Credit approved:", approveMeta?.tx?.transactionHash);

// Revoke credit approval
const { meta: revokeMeta } = await creditManager.revoke(to);
console.log("Credit revoked:", revokeMeta?.tx?.transactionHash);

// Set account sponsor
const sponsor = "0x9965507d1a55bcc2695c58ba16fb37d819b0a4dc";
const { meta: sponsorMeta } = await creditManager.setAccountSponsor(sponsor);
console.log("Account sponsor set:", sponsorMeta?.tx?.transactionHash);

// Get account details
const { result: account } = await creditManager.getAccount();
console.log("Account details:", account);

// Get credit approvals
const { result: approvals } = await creditManager.getCreditApprovals();
console.log("Credit approvals:", approvals);

// Get credit balance
const { result: balance } = await creditManager.getBalance();
console.log("Credit balance:", balance);

// Get credit stats
const { result: stats } = await creditManager.getCreditStats();
console.log("Credit stats:", stats);

Account operations

// Set up account manager
const accountManager = client.accountManager();

// Get account balance for token amount
const { result: balance } = await accountManager.balance();
console.log("Account balance:", balance);

// Get account info
const { result: info } = await accountManager.info();
console.log("Account info:", info);

// Deposit funds
const { meta } = await accountManager.deposit(parseEther("1"));
console.log("Funds deposited:", meta?.tx?.transactionHash);

// Withdraw funds
const { meta: withdrawMeta } = await accountManager.withdraw(parseEther("1"));
console.log("Funds withdrawn:", withdrawMeta?.tx?.transactionHash);

Blob operations

// Set up blob manager
const blobManager = client.blobManager();

// Get storage stats
const { result: storageStats } = await blobManager.getStorageStats();
console.log("Storage stats:", storageStats);

// Get storage usage
const { result: storageUsage } = await blobManager.getStorageUsage();
console.log("Storage usage:", storageUsage);

// Get subnet stats
const { result: subnetStats } = await blobManager.getSubnetStats();
console.log("Subnet stats:", subnetStats);

// Get blob status
const subscriber = "0x90f79bf6eb2c4f870365e785982e1f101e93b906";
const blobHash = "rzghyg4z3p6vbz5jkgc75lk64fci7kieul65o6hk6xznx7lctkmq";
const subscriptionId = "foobar";
const { result: blobStatus } = await blobManager.getBlobStatus(
  subscriber,
  blobHash,
  subscriptionId,
);
console.log("Blob status:", blobStatus);

Note: although there are other blob-specific operations (like adding or deleting blobs), they are experimental. The bucket manager is the best way to interact with blobs on the network.

Development

Install dependencies:

pnpm install

Run the tests:

pnpm run test

Build the package:

pnpm run build

Contributing

PRs accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT OR Apache-2.0, © 2025 Recall Network Corporation