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

nomis-sdk

v1.2.0

Published

SDK for scoring the wallet on Ton

Readme

Nomis Ton Score SDK

The Nomis Ton Score SDK allows you to seamlessly integrate your application with the Nomis Ton Score system. Below are the details for installation and usage of the SDK.

Installation

To install the SDK, use the following command:

npm install nomis-sdk

Methods

1. getScoreData

Retrieves information about a wallet's score.

const { isUpdate, scoreData, scoreName, token, mintData } = await getScoreData({
  address,
  referrerCode,
});

Parameters:

  • address (string): The wallet address.
  • referrerCode (string, optional): Code for referral rewards.

Returns:

  • isUpdate (boolean): Indicates if the user has previously minted the score.
  • scoreData (object): Detailed information about the wallet's score.
  • scoreName (string): The network used for scoring.
  • token (object): Information about the minted score.
  • mintData (object): Data required for minting/updating the score.

2. mintScore

Provides theree methods for minting a score and obtaining the transaction hash.

const { mintToken, getNewTxHash, getMintingTxParams } = mintScore({ address });
mintToken

Mints a token using the provided mint data and TonConnect object.

const lastTx = await mintToken({ ...mintData, tonConnect: tonConnect });

Parameters:

  • mintData (object): Data necessary for minting.
  • tonConnect (object): An instance of TonConnect or TonConnectUi that includes a sendTransaction method.

Returns:

  • lastTx (object instance of Transaction): The last transaction in the user's wallet.
getMintingTxParams

Prepares the transaction parameters required for minting a score token without tonconnect.

const txParams = await getMintingTxParams(mintData);

Parameters:

  • params: IMintData - An object containing the necessary data for minting a score token.

Returns:

  • Promise<SenderArguments> - A promise that resolves to the SenderArguments object, which contains the prepared transaction parameters.
getNewTxHash

Obtains the transaction hash for the mintToken transaction.

const txHash = await getNewTxHash(lastTx);

Parameters:

  • lastTx (object): The last transaction.

Returns:

  • txHash (string): The transaction hash.

3. getMintedToken

Retrieves the minted token object for a given wallet address.

const token = await getMintedToken({ address });

Parameters:

  • address (string): The wallet address.

Returns:

  • token (object): The minted token object.

4. isScoreHolder

Checks if the specified wallet holds a score NFT.

const isHolder = await isScoreHolder({ address });

Parameters:

  • address (string): The wallet address.

Returns:

  • isHolder (boolean): True if the wallet holds a score NFT, otherwise false.

Usage Example

Here’s a simple example of how to use the Nomis Ton Score SDK in your project:

import {
  getScoreData,
  mintScore,
  getMintedToken,
  isScoreHolder,
  getMintingTxParams,
} from "nomis-sdk";

// Example usage of getScoreData
async function fetchScoreData(address) {
  const { isUpdate, scoreData, scoreName, token, mintData } =
    await getScoreData({ address });
  console.log(scoreData);

  /*
  isUpdate: boolean;
  scoreData: {
    address: string;
    mintData: MintData;
    mintPrice: number;
    referralCode: string;
    referrerReward: number;
    referrerAddress: string | null;
    score: number;
    scoreType: number;
    stats: Stats;
    signature: string | null;
  };
  mintData: {
    calculationModel: number;
    chainId: number;
    deadline: number;
    metadataUrl: string;
    mintedChain: MintedChain;
    mintedScore: number;
    nonce: number;
    referralCode: string;
    referrerCode: string;
    signature: string;
    referrerAddress: string;
    referrerReward: string 
    mintPrice: number
  },
  scoreName: string;
  token: {
    name: string;
    score: number;
    updated: number;
    tokenId: number;
    calculationModel: number;
    chainId: number;
    owner: string;
    realTokenId: string;
    }

  */
}

// Example usage of mintScore
async function mintScoreForWallet(address, tonConnect) {
  const { mintToken, getNewTxHash, getMintingTxParams } = mintScore({
    address,
  });
  const lastTx = await mintToken({ ...mintData, tonConnect });
  const txHash = await getNewTxHash(lastTx);
  console.log(txHash);

  //string

  const txParams = getMintingTxParams(mintData);
  console.log(txParams);

  /*
  value: bigint;
  to: Address;
  body?: Maybe<Cell>;
  */
}

// Example usage of getMintedToken
async function fetchMintedToken(address) {
  const token = await getMintedToken({ address });
  console.log(token);

  /*
  name: string;
  score: number;
  updated: number;
  tokenId: number;
  calculationModel: number;
  chainId: number;
  owner: string;
  realTokenId: string
  */
}

// Example usage of isScoreHolder
async function checkScoreHolder(address) {
  const isHolder = await isScoreHolder({ address });
  console.log(isHolder);

  //boolean
}

// Example usage of mintScore

License

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

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any bugs or features.

Support

If you have any questions or need help, please open an issue on our GitHub repository.

Authors

Enjoy using Nomis Ton Score SDK!