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

@okcontract/sdk

v0.1.3

Published

One-stop-shop permissionless SDK for building any blockchain frontend

Readme

OKcontract SDK

Overview

OKcontract SDK is a low-level library for managing smart contract interactions. It interprets high-level inputs—like slippage, off-chain data, and clear gas estimates—to produce transactions. You can explore prebuilt interactions on the OKcontract Interactions Hub.

If you’re building with React, consider using the higher-level OKcontract SDK for React.

OKcontract Interactions Hub

Use the OKcontract Interactions Hub to discover smart contracts, view their ABIs, and choose methods and parameters for interactions. An interactionID is automatically generated, such as AbX2IbtBDbgJdkAXucGu.

The Hub also lets you:

  • Name an interaction and add descriptive text
  • Set allowances, pre-conditions, slippage
  • Adjust the action button text
  • And more

Getting Started

Installation

Install both cells and sdk:

npm i --save @okcontract/cells @okcontract/sdk

Example

Below is a quick example of setting up an OKContract instance:

import { optimism } from "@okcontract/multichain";
import { type AppID, OKCore, baseOptions } from "@okcontract/sdk";

const id = "myApp" as AppID;
const core = new OKCore(baseOptions(id));
const page = new OKPage(core);
const proxy = page.proxy;

// Query an existing contract interaction on Optimism
const query = proxy.new("con:velodrome/router_optimism");
const chain = proxy.new(optimism.id);
const contract = new OKContract(page, query, chain);

See the OKcontract docs for details on this setup.

Demo

For a working demo, refer to abi2ui, which provides the contract and token pages on the Hub.

Methods & Properties

A complete list of methods and properties is at docs.okcontract.com/sdk.

Features

  • Less Manual Code: Interactions reduce the amount of custom code needed for contract calls.
  • Transaction Computation: Automatically handles gas estimates, slippage, and off-chain data.
  • Wallet Connection: Connects to a user’s wallet, triggers transactions, and reads balances.
  • Onchain and Off-chain Data: Synchronizes all required data for transactions.
  • Event Listening: Monitors contract events to update UI state in real time.
  • Error Handling: Surfaces clear error messages for failed transactions or data issues.
  • Multiple Chains: Works with EVM-compatible blockchains (Starknet support coming).

Design & Philosophy

The SDK is designed to be permissionless and easy to set up. No API key is required.

Documentation

For more examples and detailed explanations, visit docs.okcontract.com/sdk.

License

The OKcontract SDK is built by OKcontract. The npm package is available under the Apache license. The source repository will also be released under an open source license.