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

@realmint/sdk

v0.3.0

Published

TypeScript SDK for the Realmint API — list, buy, and sell tokenized RWAs (non-custodial; the partner's signer signs).

Readme

@realmint/sdk

TypeScript SDK for the Realmint API — list, buy, sell, and withdraw tokenized real-world assets. Non-custodial: you inject the signer, the SDK never holds keys. Gas is sponsored in USDC (no native gas needed), and funding is over x402.

npm install @realmint/sdk

You bring your own EVM signer (viem account or an EIP-1193 provider). For Solana sells you also bring a Solana signer. Node 18+ (native fetch).

Quick start

import { RealmintClient, signerFromViemAccount } from "@realmint/sdk";
import { privateKeyToAccount } from "viem/accounts";

const client = new RealmintClient({ apiKey: process.env.REALMINT_API_KEY! });

// The user's EVM account (the partner manages this key, not Realmint).
const account = privateKeyToAccount(userPrivateKey);
const sign = signerFromViemAccount(account);

List

const assets = await client.listAssets({ roots: true });
const paxg = await client.getAsset("paxg");
const score = await client.getScore("paxg");
const venues = await client.getRouteSupport("paxg");
const holdings = await client.getPortfolio(account.address);

Buy

buy() runs the whole lifecycle: create → prepare → sign the UserOp → submit to the bundler → execute → poll to completion. The user's smart account must already hold USDC (fund it with fundWithX402 first).

const intent = await client.buy(
  {
    asset_id: "paxg",
    source_token: "USDC",
    amount_in: 100,            // 100 USDC
    agent_wallet: account.address,
  },
  sign,
);
console.log(intent.status); // "completed"

Sell

EVM-deployed assets sell with zero signatures (the protocol executes the swap via a session key):

const sold = await client.sellEvm({
  asset_id: "paxg",
  source_token: "USDC",
  amount_in: 0.05,            // asset quantity to sell
  agent_wallet: account.address,
});

Solana-deployed assets take one Solana signature on the prepared wire:

import { SignSolanaWire } from "@realmint/sdk";

const signWire: SignSolanaWire = async (wireBase64) => {
  // co-sign the base64 V0 transaction with the user's Solana key, return base64
};
const sold = await client.sellSolana(
  { asset_id: "tslax", source_token: "USDC", amount_in: 1, agent_wallet: account.address },
  signWire,
);

Withdraw / send

Move funds out of your smart account to any address — gasless (paymaster-sponsored), one UserOp signature (same signer as buy). Works for both the keyless agent identity and Privy human identity.

const res = await client.withdraw(
  {
    chain_id: 1776,                       // Injective
    owner_eoa: account.address,
    token_address: "0xa00C59fF5a080D2b954d0c75e46E22a0c371235a", // native USDC
    recipient: "0x…",
    amount_raw: "4800000",                // 4.8 USDC (6 decimals)
  },
  signUserOpHash,
);
// res.mode === "bundler", res.user_op_hash set

Fund with x402

import { fundWithX402 } from "@realmint/sdk";

await fundWithX402(
  client,
  { owner_eoa: account.address, amount_usdc: 100 },
  async (paymentRequirements) => {
    // settle the requirements with your x402 client (e.g. the Coinbase x402 SDK
    // with a viem account on Base) and return the encoded X-PAYMENT header value
  },
);
// USDC is bridged to the user's Injective smart account, ready for buy().

Keyless agent auth

An autonomous agent holding only its own EVM key can authenticate without an API key: agentLogin exchanges an EOA signature for a bearer and returns a ready client.

import { agentLogin, fundWithX402, signerFromViemAccount } from "@realmint/sdk";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.AGENT_PRIVATE_KEY!);
const { client } = await agentLogin({
  ownerEoa: account.address,
  signMessage: (m) => account.signMessage({ message: m }),
});

await fundWithX402(client, { owner_eoa: account.address, amount_usdc: 5, asset_id: "tslax" }, payX402);
await client.buy(
  { asset_id: "tslax", source_token: "USDC", amount_in: 5, agent_wallet: account.address },
  signerFromViemAccount(account),
);

The bearer only authorizes quoting/creating intents for the EOA's own smart accounts; moving funds still requires the EOA's UserOp signature. See the reference agent.

Signing model

buy() signs an ERC-4337 UserOp v0.7 digest as an EIP-191 personal_sign over the 32-byte hash — that's what signerFromViemAccount / signerFromEip1193 produce. Don't use an EIP-712 typed sign or a raw ECDSA sign; the smart account validates the personal_sign form.

Lower-level methods (accountStatus, createIntent, prepareIntent, executeIntent, getIntent, reconcileIntent, waitForSettlement, submitUserOp) are exposed if you need to drive the lifecycle yourself.

See the full API reference at https://api.realmint.io/docs.