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

@mitumjs/mitumjs

v2.2.1

Published

framework for imfact network

Readme

Abstraction

  • mitumjs is the official JavaScript/TypeScript SDK for the Mitum blockchain.
  • The Mitum blockchain operates on a multi-sig account basis. However, for user convenience, single-sig is prioritized.
  • Method names are designed to be called intuitively from the user's perspective and use camelCase notation for consistency.

1. Install (Recommended)

For all dApp and back-end development, we strongly recommend using the official npm package.

This package automatically provides the correct bundle for your environment (Node.js or Browser).

$ npm install @mitumjs/mitumjs

2. Usage

The SDK provides two main classes, which are both available as named exports:

Mitum: The main SDK class for core logic. Use this to create operations, generate keys, and communicate directly with a Mitum node (via its API Endpoint).

BrowserProvider: The EIP-1193 standard provider. Use this in dApps to connect to browser wallets like Fact Wallet (window.imfact) for account requests and transaction signing.

A. For Browser Environments (dApps, Vite, React)

Use the ES Module (ESM) bundle via import. This bundle includes necessary browser polyfills (like Buffer) automatically. You no longer need to configure polyfills in your vite.config.ts or perform manual fixes

// Example: Connecting to Fact Wallet in a React dApp
import { Mitum, BrowserProvider } from '@mitumjs/mitumjs';

// 1. Initialize the Provider by wrapping the wallet's injected object
const provider = new BrowserProvider(window.imfact);

// 2. Request account access (triggers wallet popup)
const accounts = await provider.requestAccounts();
const userAddress = accounts[0];

// 3. Initialize the Mitum core class to create operations
//    This requires the Node's API Endpoint for blockchain queries/submissions.
const mitum = new Mitum("https://testnet.imfact.im"); // API endpoint for imFact Testnet

const recipientAddress = "0x...";
const op = mitum.currency.transfer(userAddress, recipientAddress, "FACT", 100);
const txObject = op.toHintedObject(); // Create the JSON object for the wallet

// 4. Send the transaction object to the wallet for signing
const factHash = await provider.sendTransaction(txObject);
console.log('Transaction Fact Hash:', factHash);

// 5. Listen for wallet events
provider.on('accountsChanged', (newAccounts) => {
  console.log('Wallet accounts changed:', newAccounts);
});

B. For Node.js Environments (Back-end, Scripts)

Use the CommonJS (CJS) bundle via require. This bundle uses Node.js native modules (like the built-in Buffer) for optimal performance.

// Example: Sending a transaction from a Node.js server
const { Mitum } = require('@mitumjs/mitumjs');

// 1. Initialize the Mitum core class with the Node's API Endpoint URL
//    This requires the Node's API Endpoint for blockchain queries/submissions.
const mitum = new Mitum("https://testnet.imfact.im"); // API endpoint for imFact Testnet

// 2. Create and sign an operation
const sender = "0x...";
const privateKey = "...";
const recipientAddress = "0x...";
const op = mitum.currency.transfer(sender, recipientAddress, "FACT", 100);
op.sign(privateKey);

// 3. Send the signed operation directly to the node's API Endpoint
const sendOperation = async () => {
  try {
    const info = await mitum.operation.send(op);
    console.log(info); // Check the operation sended sucessfully.
    const receipt = await info.wait(); // Wait for the transaction to be confirmed
    console.log(receipt);
  } catch (error) {
    console.error("Failed to send operation:", error);
  }
};

sendOperation();

3. Important Functions Note

The operation objects created by the Mitum SDK (e.g., mitum.currency.transfer(...)) are raw transaction messages.

  • They require signing via the .sign() method (in Node.js) or a provider.sendTransaction(-) request (in browsers).

  • A signed operation must be sent to the network via the mitum.operation.send() function (in Node.js) or provider.sendTransaction() (in browsers) to be executed.

4. Mitum JS SDK User Guide

For detailed information on all functions, models, and advanced usage, please refer to our official GitBook documentation.

Be sure to check it out before using the SDK.

📖 Mitum JS SDK user guide

5. Exports Overview

Classes

  • Mitum — Main SDK class for core logic and node communication.
  • BrowserProvider — EIP-1193 Provider for browser wallet (dApp) communication.

Types

  • Fact, BaseOperation, Item, Authentication, ProxyPayer, Settlement
  • Account, HDAccount, defaultPath

Utilities

  • isOpFact(object)
  • isHintedObject(object)
  • isHintedObjectFromUserOp(object)