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

@duneanalytics/sim-idx

v2.0.1

Published

A TypeScript library for writing Sim IDX apps

Readme

@duneanalytics/sim-idx

npm version npm downloads License: MIT Tests Prettier TypeScript

A TypeScript library for writing Sim IDX apps.

Installation

npm install @duneanalytics/sim-idx
# or
yarn add @duneanalytics/sim-idx
# or
pnpm add @duneanalytics/sim-idx

API Reference

App Creation

import { create } from '@duneanalytics/sim-idx';

interface Env {
  CUSTOM_VAR: string;
}

const c = create<Env>();

Database Client

import { db } from '@duneanalytics/sim-idx';

// Get database client from Hono context
const client = db.client(context);

Blockchain Types

import { address, bytes32, uint256, int256 } from '@duneanalytics/sim-idx';
import { Address, Bytes, Uint, Int } from '@duneanalytics/sim-idx';

// Address type
const walletAddress = address('wallet_address');

// Bytes types (1-32 bytes)
const hash = bytes32('transaction_hash');
const shortData = bytes16('short_data');

// Integer types
const balance = uint256('balance');
const signedValue = int256('signed_value');

Middlewares

The library provides a middleware for authentication.

When a valid Sim IDX API key is submitted in the Authorization header (please see the documentation for authentication options), your API will receive the API key name in the X-IDX-AUTHENTICATED-API-KEY-NAME header. The authentication middleware uses this header to decide if a request is authenticated or not.

import { App, middlewares } from '@duneanalytics/sim-idx';

const app = App.create();
app.use('*', middlewares.authentication);

Note: In non-production environments, the authentication middleware will be disabled.

Environment Variables

The library expects these environment variables:

  • DB_CONNECTION_STRING: Your database connection string
  • NODE_ENV: Set to production for production environments.

Development

# Install dependencies
pnpm install

# Run tests
pnpm test

# Build the library
pnpm build

# Lint code
pnpm lint

# Format code
pnpm fix:prettier

Deploying

  1. First, update package.json with the next version number (and merge that)

  2. Then, create a new tag in the format of v*.*.* (check https://github.com/duneanalytics/sim-idx-ts/tags for the latest tag) and increase it accordingly.

    Creating a new tag will run a Github action that will build & publish the library to npm.

  3. Create a new release on GitHub with the same version number.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support