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

uiem

v1.0.3

Published

Modern, lightweight TypeScript SDK for building on Umi Network with Viem integration. Open-source, modular, and developer-friendly.

Readme

uiem SDK

Modern, lightweight TypeScript SDK for building on the Umi Network with Viem integration. Open-source, modular, and developer-friendly.

GitHub License: MIT


Features

  • TypeScript-first: Full type safety and modern developer experience
  • Viem Integration: Leverages the viem toolkit for Ethereum and L2s
  • Custom Actions: Easily extend clients with uiem-specific contract actions
  • BCS Serialization: Built-in support for Umi Network's BCS-encoded contract calls
  • Modular: Use only what you need—public client, wallet client, serialization, and more
  • Open Source: MIT licensed and open to contributions

Installation

npm install uiem
# or
yarn add uiem

Quick Start

import { createPublicClient,createWalletClient } from 'uiem';

const publicClient = createPublicClient();
const walletClient = createWalletClient();

API Usage

1. Public Client (Read-Only)

import { createPublicClient } from 'uiem';
import { Abi } from 'viem';

const erc20Abi: Abi = [/* ... */];
const contractAddress = '0x...';
const userAddress = '0x...';

const publicClient = createPublicClient();

// Prepare calldata for a contract read
const calldata = publicClient.getFunction('balanceOf', erc20Abi, contractAddress, [userAddress]);

// Call the contract (read-only)
const result = await publicClient.callFunction({
  to: calldata.to,
  data: calldata.data,
});
console.log('Balance:', result);

2. Wallet Client (Write)

import { createWalletClient } from 'uiem/clients/walletClient';
import { devnet } from 'uiem/chain';

const walletClient = createWalletClient({ chain: devnet });

// Prepare calldata for a contract write (e.g., transfer)
const transferCalldata = publicClient.getFunction('transfer', erc20Abi, contractAddress, [userAddress, '1000000000000000000']);

// Send a transaction (requires wallet connection)
const tx = await walletClient.uiemWriteContract({
  to: transferCalldata.to,
  data: transferCalldata.data,
  // account: ... // Optionally specify account
  // value: 0n // Optionally send ETH
});
console.log('Transaction result:', tx);

Advanced Usage

BCS Serialization

import { serializer } from 'uiem';

const rawCalldata = '0xa9059cbb...';
const serialized = serializer(rawCalldata);
console.log('Serialized:', serialized);

Custom Chains

You can use your own chain configuration:

import { defineChain } from 'viem';

const customChain = defineChain({
  id: 12345,
  name: 'MyChain',
  nativeCurrency: { name: 'ETH', symbol: 'ETH', decimals: 18 },
  rpcUrls: { default: { http: ['https://mychain-rpc.com'] } },
});

const client = createPublicClient({ chain: customChain });

Hardhat Deployment with uiem

You can use uiem's BCS serialization utilities in your Hardhat deployment scripts for Umi Network compatibility.

Installation

npm install uiem
# or
yarn add uiem

Usage Example

import { serialize } from 'uiem/hardhat';
import { ethers } from 'hardhat';

async function main() {
  // Compile your contract and get the bytecode
  const MyContract = await ethers.getContractFactory('MyContract');
  const bytecode = MyContract.bytecode;

  // Serialize the bytecode for Umi Network deployment
  const serializedBytecode = serialize(bytecode);
  console.log('Serialized bytecode:', serializedBytecode);

  // You can now use serializedBytecode in your deployment transaction
  // ...
}

main().catch(console.error);
  • The serialize function wraps and encodes your contract bytecode for Umi Network deployment.
  • You can also use this utility for function call data if needed.

Type Definitions

  • uiemPublicClient: Public client with uiem custom actions (getFunction, callFunction)
  • uiemWalletClient: Wallet client with uiem custom actions (uiemWriteContract)

Types are available in the source and can be imported from the relevant modules.


Example

See src/example/index.ts for a full working example.


Contributing

  1. Fork the repo and create your branch
  2. Run npm install
  3. Make your changes and add tests/examples
  4. Run npm run build and npm test
  5. Submit a pull request!

License

MIT © Defiboy


Links