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

@uledgerinc/typescript-sdk

v2.0.3

Published

ULedger TypeScript SDK - Built on Go SDK compiled to WebAssembly

Readme

ULedger TypeScript SDK

A high-performance WASM-powered SDK built on the ULedger Go SDK

The ULedger TypeScript SDK provides a modern, browser-safe and Node-compatible interface to ULedger cryptographic functions, wallet utilities, BIP-39 mnemonic tools, and transaction signing.

All cryptography is executed inside a WebAssembly module compiled from the official ULedger Go SDK, ensuring correctness, security, and identical behavior across environments.

Installation

npm install @uledgerinc/typescript-sdk

The SDK provides both ESM and CommonJS builds. You can import it in any environment:

ESM

import { getULedgerSDK } from "@uledgerinc/typescript-sdk";

CommonJS

const { getULedgerSDK } = require("@uledgerinc/typescript-sdk");

Initialization

Before calling any wallet, crypto, or transaction functions, you must initialize the WASM runtime.

This is done automatically by calling:

const sdk = await getULedgerSDK();

This will:

Load the Go WebAssembly binary

Load the Go WASM runtime (wasm_exec.js)

Initialize exported functions

Return a fully-configured SDK instance

● Basic Usage Example import { getULedgerSDK } from "@uledgerinc/typescript-sdk";

async function main() { // Initialize the WASM-backed SDK const sdk = await getULedgerSDK();

// Get SDK metadata console.log(sdk.getInfo());

// Generate a new random wallet const wallet = sdk.generateWallet(); console.log("Wallet:", wallet.toJson(true));

// Generate a BIP39 mnemonic const mnemonic = sdk.generateMnemonic(); console.log("Mnemonic:", mnemonic);

// Restore a wallet from mnemonic const restored = sdk.walletFromMnemonic(mnemonic.mnemonic); console.log("Restored wallet:", restored.toJson(true));

// Sign a message const sig = sdk.signWithWallet(restored, "hello world"); console.log("Signature:", sig);

// Verify signature const verify = sdk.verifySignature(restored.publicKeyHex, "hello world", sig.signatureHex); console.log("Verified:", verify.valid); }

main();

● API Overview Initialization await getULedgerSDK(): ULedgerWASM

Loads WASM and returns an initialized instance.

Wallet Functions sdk.generateWallet(options?)

Generate a new wallet with optional parameters:

const wallet = sdk.generateWallet({ keyType: "secp256k1", // secp256k1 | ed25519 | mldsa87 | bls12377 entropy: 256, // 128–256 bits password: "", parent: "", });

sdk.walletFromMnemonic(mnemonic, options?)

Restore from BIP-39 phrase.

const wallet = sdk.walletFromMnemonic(mnemonic, { keyType: "secp256k1" });

sdk.walletFromHex(publicKeyHex, privateKeyHex)

Create a wallet from existing raw keys.

wallet.toJson(includePrivate = false)

Export wallet to JSON.

BIP-39 Utilities sdk.generateMnemonic(entropyBits?)

Returns:

{ mnemonic: string }

sdk.validateMnemonic(mnemonic)

Returns:

{ valid: boolean }

sdk.mnemonicToSeed(mnemonic, passphrase?)

Returns:

{ seedHex: string }

Crypto Functions sdk.signMessage(publicKeyHex, privateKeyHex, message)

Returns signature + hash.

sdk.signWithWallet(wallet, message)

Convenience wrapper.

sdk.verifySignature(publicKeyHex, message, signatureHex)

Returns:

{ valid: boolean }

sdk.hashMessage(message)

Returns:

{ hashHex: string }

Transaction Functions sdk.signTransactionInput(transactionInput, wallet, password?)

Signs a transaction input using Go’s internal hashing and commitment logic.

const signed = sdk.signTransactionInput(tx, wallet);

● Runtime Details Dual-module output

The package ships:

dist/esm → ESM modules dist/cjs → CommonJS modules dist/wasm → Shared wasm_exec.js + uledger-sdk.wasm

Both runtimes load the same WASM files from dist/wasm/.

Node, Bun, and Browser Support Environment Supported Notes Node ≥ 16 ✔ Full WASM + crypto support Bun ✔ Works in CJS or ESM mode Browser ✔ Requires bundler copying WASM assets Deno Partial Needs adapted WASM loader ● Error Handling

Most SDK functions throw a standard JavaScript Error when the underlying Go function returns { success: false, error: "..." }.

Always wrap calls in try/catch when handling user input.

● Contributing

This SDK is autogenerated from the ULedger Go SDK using WebAssembly. For development:

npm install npm run build