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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@harish551/namada-sdk

v0.18.1

Published

Namada SDK package

Readme

namada-sdk

The Namada SDK package

Usage

Installation

npm install @harish551/namada-sdk

# Or, via yarn
yarn add @harish551/namada-sdk

Initializing the SDK

As this package depends on Wasm compiled from Rust to integrate with Namada, this must be loaded asynchronously when developing for the Web. The following is a quick overview of some of the features of the SDK package:

import { Sdk, getSdk } from "@harish551/namada-sdk/web";
import sdkInit from "@harish551/namada-sdk/web-init";

// Load Tx props from types package
import { BondProps, WrapperTxProps } from "@harish551/namada-types";

// Amounts are defined as BigNumber
import BigNumber from "bignumber.js";

// Define the following values:
const rpcUrl = "https://rpc.example.net";
const tokenAddress = "tnam1qxgfw7myv4dh0qna4hq0xdg6lx77fzl7dcem8h7e"; // bech32m encoded NAM address
const chainId = "namada-testnet-1";

const init = async (): Promise<void> => {
  const { cryptoMemory } = await sdkInit();
  const sdk = getSdk(rpcUrl, tokenAddress, cryptoMemory);

  // Access various modules of the SDK
  const { keys, mnemonic, rpc, signing, tx } = sdk; // Alternatively, invoke getters directly, e.g., sdk.getRpc(), etc.

  // Examples:

  // Generate a 24 word mnemonic
  const mnemonicPhrase = mnemonic.generate(24).join(" ");

  // Mnemonic to seed
  const seed = mnemonic.toSeed(mnemonicPhrase);

  // Derive a keypair and address
  const bip44Path = {
    account: 0,
    change: 0,
    index: 0,
  };
  const { address, publicKey, privateKey } = keys.deriveFromSeed(
    seed,
    bip44Path
  );

  // Construct a Bond transaction
  const bondProps: BondProps = {
    source: address,
    validator: "tnam1q9vhfdur7gadtwx4r223agpal0fvlqhywylf2mzx",
    amount: BigNumber(123),
  };

  // Define Wrapper Tx props
  const wrapperTxProps: WrapperTxProps = {
    token: tokenAddress,
    feeAmount: BigNumber(1),
    gasLimit: BigNumber(1000),
    chainId: "",
    publicKey,
    memo: "A bond transaction",
  };

  // Build a Bond transaction
  const bondTx = await tx.buildBond(bondProps, wrapperTxProps);

  // Sign a Bond transaction with a private key
  const signedBondTxBytes = await signing.sign(bondTx, privateKey);

  // Broadcast the signed transaction to a node
  const txResponse = await rpc.broadcastTx(signedBondTxBytes, wrapperTxProps);
};

init();

Types

Explore the generated type docs here: modules.md

Development

In order to compile the required Rust libraries locally (@namada/crypto and @namada/shared), issue one of the following commands, depending on the environment you are targeting:

# Build wasm for single core, release mode
yarn wasm:build[:node]

# Build wasm for multicore, release mode
yarn wasm:build[:node]:multicore

# Build wasm with debugging for single core
yarn wasm:build[:node]:dev

# Build wasm with debugging for multicore
yarn wasm:build[:node]:dev:multicore

# Generate new docs
yarn build:docs