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

starknet-wallet-checker

v1.0.0

Published

A library to check if a Starknet address is a smart wallet, smart contract, or invalid. This also solves the issue of inconsistent address length.

Readme

Starknet Wallet Checker

A TypeScript library to detect Starknet smart wallet contracts and validate Starknet addresses.

Features

Check if an address is a smart wallet or smart contract.

Validate Starknet addresses (including fixing addresses with incorrect length).

Easy-to-use API with clear return types.

Installation

npm install starknet-wallet-checker

Usage

  1. Check if an Address is a Smart Wallet or Smart Contract Use the checkAddress function to determine if a given address is a smart wallet, smart contract, or invalid.

Example:

import { checkAddress } from "starknet-wallet-checker";

const address =
  "0x06eC96291A904b8B62B446FB32fC9903b5f82D73D7CA319E03ba45D50788Ec30";
const result = await checkAddress(address);

console.log(result);

Output The checkAddress function returns an object of type CheckResult with the following properties:

{
  isValidAddress: boolean; // Whether the address is valid
  isSmartWallet: boolean; // Whether the address is a smart wallet
  isSmartContract: boolean; // Whether the address is a smart contract
  message: string; // A human-readable message describing the result
}

Example Output:

{
  "isValidAddress": true,
  "isSmartWallet": false,
  "isSmartContract": false,
  "message": "🛡️ Is Smart Wallet: ✅ Yes\nYou are interacting with a smart-wallet"
}
  1. Validate a Starknet Address Use the isValidStarknetAddress function to validate a Starknet address and fix addresses with incorrect length.

Example:

import { isValidStarknetAddress } from "starknet-wallet-checker";

const address =
  "0x06eC96291A904b8B62B446FB32fC9903b5f82D73D7CA319E03ba45D50788Ec30";
const [isValid, fixedAddress] = isValidStarknetAddress(address);

console.log(`Is valid: ${isValid}`); // true or false
console.log(`Fixed address: ${fixedAddress}`); // Returns the fixed address the provided address one bit lesser and if the address length is valid it returns it as it is.

Output The isValidStarknetAddress function returns a tuple:

[boolean]: Whether the address is valid.

[string]: The fixed address (if applicable) or the original address.

Example output:

Is valid: true
Fixed address: 0x0123...

API Reference

checkAddress(address: string, options?: CheckWalletOptions): Promise<CheckResult>

Checks if a given Starknet address is a smart wallet, smart contract, or invalid.

Parameters

  • address: The Starknet address to check.

  • options: Configuration options.

    ∘ nodeUrl: Custom RPC node URL.

Returns

A Promise resolving to a CheckResult object.

isValidStarknetAddress(address: string): [boolean, string] Validates a Starknet address and fixes addresses with incorrect length.

Parameters

  • address: The Starknet address to validate.

Returns

A tuple:

  • [boolean]: Whether the address is valid.

  • [string]: The fixed address (if applicable) or the original address.

License

This project is licensed under the MIT License. See the LICENSE file for details.